Professional Documents
Culture Documents
Datastage XMETA Queries
Datastage XMETA Queries
Prior to Datastage version 8, the datastage repository information was stored in files(uv). From
version 8, the repository information is also stored in database. Since the information is available in
database, it is easier to write queries and find the details. I think you can install the repository either
in DB2 or in Oracle.IBM doesn't provide much information about the XMETA repository.
In my project, the datastage repository was built on DB2 database. In fact, datastage installation
comes with DB2 database software.
I found that the table names and column names are bit weird with some funky characters &
numerals at the end may be that's IBM strategy to keep XMETA information away from the
developers..:)
A word of caution: Do not try to alter the XMETA repository contents as it may have adverse effects.
Below are some of the queries that I have developed:
1. Query to list Projects
SELECT * FROM XMETA.DATASTAGEX_XMETAGEN_DSPROJECTC2E76D84;
2. List the folders within a project
SELECT * FROM XMETA.DATASTAGEX_XMETAGEN_DSFOLDERC2E76D84
WHERE XMETA_CREATED_BY_USER_XMETA != 'DataStageSystemUser'
AND projectNAMESPACE_XMETA = 'COMMDSTAGEDEV:salesandadjustment';
3. Query to retrieve the DS JOB information
SELECT
(TIMESTAMP('01/01/1970', '00:00:00') + (XMETA_CREATION_TIMESTAMP_XMETA / 1000)
SECONDS) AS CREATION_TIME,
(TIMESTAMP('01/01/1970', '00:00:00') + (XMETAMODIFICATIONTIMESTAMPXMET / 1000)
SECONDS) AS MODIFIED_TIME,
A.*
FROM
XMETA.DATASTAGEX_XMETAGEN_DSJOBDEFC2E76D84 AS A
WHERE
NAME_XMETA = 'mydsjob';