Sunday, February 19, 2012

For Each Container for XML Source Adapter

I know how to For Each Loop a Flat File... But there is not File connection to reference for the XML Source adapter.

How do I run XML files through my DataFlow from a directory with the For Each Loop?I am going to assume two things:
1. the schema is the same for all of the files, and you have already set up the XmlSrc using valid data and schema to get the metadata initialized
2. you have, in your for loop, a variable with the name of the current file

In your XmlSrc, in the advanced editor, Component Properties, under Custom Properties, set the AccessMode to 1 (this means the file name is in a variable), and set the XMLDataVariable property to the name of the variable with the file name.

Let me know if that works for you.
Thanks,
Mark|||Marc,

Thank you for the Late Night answer. It worked perfectly, and I would have not figured that out without you.

Your Money!

No comments:

Post a Comment