Page 1 of 1

Best key candidate for datastage XML export

Posted: Thu Oct 15, 2009 1:20 am
by muralisankarr
We are trying the change some element value in datastage job xml export through a datastage job.

In XMLInput stage we are confused with the Key column selection. Please guide us which element is the best candidate for key column for datastage xml. Please refer the DTD below


<!DOCTYPE DSExport [
<!ELEMENT DSExport (Header, (Job |
SharedContainer |
IMSDatabase |
IMSViewset |
DataElements |
MachineProfiles |
Routines |
StageTypes |
TableDefinitions |
Transforms)+
) >
<!ELEMENT Header EMPTY >
<!ATTLIST Header
CharacterSet CDATA #IMPLIED
ExportingTool CDATA #IMPLIED
ToolVersion CDATA #REQUIRED
ServerName CDATA #IMPLIED
ToolInstanceID CDATA #IMPLIED
Date CDATA #IMPLIED
Time CDATA #IMPLIED
ServerVersion CDATA #IMPLIED
>
<!ELEMENT Job (Record*) >
<!ATTLIST Job
Identifier CDATA #REQUIRED
DateModified CDATA #IMPLIED
TimeModified CDATA #IMPLIED
>
<!ELEMENT SharedContainer (Record*) >
<!ATTLIST SharedContainer
Identifier CDATA #REQUIRED
DateModified CDATA #IMPLIED
TimeModified CDATA #IMPLIED
>
<!ELEMENT IMSDatabase (Record*) >
<!ATTLIST IMSDatabase
Identifier CDATA #REQUIRED
DateModified CDATA #IMPLIED
TimeModified CDATA #IMPLIED
>
<!ELEMENT IMSViewset (Record*) >
<!ATTLIST IMSViewset
Identifier CDATA #REQUIRED
DateModified CDATA #IMPLIED
TimeModified CDATA #IMPLIED
>
<!ELEMENT DataElements (Record*) >
<!ELEMENT MachineProfiles (Record*) >
<!ELEMENT Routines (Record*) >
<!ELEMENT StageTypes (Record*) >
<!ELEMENT TableDefinitions (Record*) >
<!ELEMENT Transforms (Record*) >
<!ELEMENT Record ((Property | Collection)*) >
<!ATTLIST Record
Identifier CDATA #REQUIRED
DateModified CDATA #IMPLIED
TimeModified CDATA #IMPLIED
Type CDATA #REQUIRED
Readonly (0|1) '0'
IsStage (0|1) '0'
>
<!ELEMENT Property (#PCDATA | ListItem | DSXML)* >
<!ATTLIST Property
Name CDATA #REQUIRED
PreFormatted (0|1) '0'
xml:space (default|preserve) 'preserve'
>
<!ELEMENT ListItem (#PCDATA)* >
<!ATTLIST ListItem
DisplayName CDATA #REQUIRED
xml:space (default|preserve) 'preserve'
>
<!ELEMENT DSXML ANY >
<!ELEMENT Collection (SubRecord*) >
<!ATTLIST Collection
Name CDATA #REQUIRED
Type CDATA #REQUIRED
>
<!ELEMENT SubRecord (Property*) >
]>
Many Thanks
MSR
[/quote]

Posted: Thu Oct 15, 2009 3:22 am
by eostic
You will have MANY keys..... the "key" is a "repetitiion element". For "each node path", it represents a column at the "desired bottom" of your retrieval for that node path --- in other words, a "row" that you would like to have retrieved (as if a "relational table") for that node. Every link must represent some particular node path, and one column (pick any element) at the "desired bottom" of that path can be the "key".

Do some searching...there are other threads where this has been discussed.

I have written jobs to read xml exports.....you can expect to have many links....for columns, for stage types, etc.

Ernie

Posted: Thu Oct 15, 2009 5:22 am
by chulett
In my mind, it would be easier to work with a .dsx export.