Page 1 of 1

Pass filename with records while reading multiple files

Posted: Mon Nov 26, 2012 6:41 pm
by Kumar1234
I am reading multiple xml files using file pattern (*.xml) and loading into a teradata table. I have a requirement to pass the filename along with the records. I need to do this on server job as the current design already exist and this is an addition.
I searched the forum, but did not find any favorable solution.

Kindly Help....

Posted: Mon Dec 10, 2012 12:51 pm
by BrunoD
Hi,
Did you get any solution? I have a similar scenario.
Thanks.

Posted: Mon Dec 10, 2012 11:21 pm
by chulett
How similar? For anything other than exactly the same you should start your own post.

If you are processing XML files in a Server job you should be using a Folder stage and that can automatically pass in the name of the file along with the file contents.

Posted: Mon Apr 01, 2013 11:03 am
by Kumar1234
sorry I forget to reply to this post. When you read the XML in XML-Input stage you can add FileName column with VARCHAR 255 in output along with other attributes and it will automatically populate the filename to your output.