Transform XML file to sequential file

Using server job, how to transform data in XML file into sequential file?? i have used XML input, XML transformer and a sequential file.

Questions by sharmilas

Showing Answers 1 - 6 of 6 Answers

dwh_com

  • Jun 24th, 2008
 

i will explain u the stages used inorder..

FOLDER STAGE--------->XMLINPUTSTAGE--------->TRANSFORMER------>SEQUENTIAL FILE

folder stage is to check for the folder which has xmlfile and u have to give wildcard as .xml
in XML inputstage load the columns from the xml importer and select only the values and map the same in transformer.thats it

  Was this answer useful?  Yes

shm_Ariel

  • Jul 4th, 2008
 

Import the XSD for the xml file via manager-metadata importer and store it. 

If transformation functions are not required to be done on the data in XML file, there is no need for the transformer. To load data directly from a XML file to Sequential file:-
use these stages in the design:-

FOLDER->XMLINPUT->SEQUENTIAL FILE

(If transformation is required, u can use the Transformer stage in between XMLINPUT stage and SEQFILE stage)

In FOLDER stage properties->Assign the filepath , can be given as wildcard. Here the whole data in the file will be taken as a single row and streamed through the folder stage.In output: metadata will be 'File'(filename-key-varchar) and 'Data'(single row of data-long varchar 9999)

In XMLINPUT stage->Source- select the 'File' in source column and content as Filepath  or (select 'Data' and XML doc- select accordingly)
Output Link-> Import the column metadata from table definition stored and map directly to seq file( or to transformer->seq file).

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions