Best key candidate for datastage XML export

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
muralisankarr
Premium Member
Premium Member
Posts: 83
Joined: Tue Oct 28, 2008 1:55 am
Location: Chennai

Best key candidate for datastage XML export

Post 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]
The minute you start talking about what you're going to do if you lose, you have lost
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post 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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In my mind, it would be easier to work with a .dsx export.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply