pniland wrote:Dear Ernie,
Thanks for your reply.
I was not entirely sure what you meant in your post being new to datastage.
I have spoken to IBM and they have shared me the following solution which I think may be exactly what you were explaining.
Step1: Create a job parameter of type pathname with the location of your xml file in the default value field.
Step2: Create a row genreator - In the output create a column called trigger with a type of char that is not nullable
Step3: Create a Transformer that that has the name of the paramemter defind in step 1 as the Derivation
Step4: create a xml_input stage
Stage Properties: - General tab
I have Validate input xml and enable grammer caching turned on
Stage Properties: - Transformation Settings tab
Include namesace declation is checked
Input Properties: - XML source tab
Column is the name of the column from the transformer task
URL/File Path is checked
Input Properties: - Columns tab
create column "path" not a key of type VarChar tha is not nullable
output Properties: - Transformation settings tab
Inherit stage properties is checked
output Properties: - columns tab
name - BRANCH_NO
derivation - test.BRANCH_NO
key - yes (other columns set to no)
SQL Type VarChar
Extended - Unicode
Length - 10
Nullable = no
Display = 10
Description /storeInformation/s/BRANCH_NO/text()
The rest should be self explanitory as per the tutorial
Cheers,
Paul
Hey Paul,
I used the above approach to read an XML file. But, I am getting the following error
"XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:XMLPlatformException, Message:Could not read data from file"
Any idea, why is it happening?
Thanks,
Nagin.