How to convert table data into xml file using xml output
stage? please explain step by step;

Answer Posted / srinivas

Hi Mukti,

To load the data into XML file first you need import the xml metadata as you expected structure by using the .xsd file or .xml file.
While importing the structure you must careful about the structure and if any value is repeating then define as a key column.

For example in above xml structre child value is diffrent and parents are same for the three rows like below :

CHANGE NAME DATASOURCE ACTION VALUE
ADD MY GSDBDatabase READ 2011
ADD MY GSDBDatabase READ 2012
ADD MY GSDBDatabase READ 2013

in above table VALUE column is unique and other values are same Note: this is taken from XML definition on question i took only 5 columns because of space issue.

In this situation you should define VALUE column as key column in XML output stage.

Job structure should like below:

SourceStage ---->transformer ----> XML output Stage.

Note:Before loading data into XML file you must sort the data other wise order will be change, what ever order you have in source the same order will load in to XML file So these words are mindful.

If you face any problem please let me knoow.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How complex jobs are implemented in datstage to improve performance?

779


how can we create rank using datastage?what is the meaning of rank?

8442


What is the flow of loading data into fact & dimensional tables?

817


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

2636


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

3010


How and where you used hash file?

877


What is the different type of jobs in datastage?

729


Define APT_CONFIG in Datastage?

852


What is the difference between validated and compiled in the datastage?

890


Can we use target hash file as a lookup ?

3041


1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)

2502


Nls stands for what in datastage?

949


how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)

704


Can you explain kafka connector?

1022


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

2964