December 21, 2020 at 3:48 pm
Hello,
(can't upload images into body, neither .png or .jpg, size is less then 1024KB)
My goal is to read data from XML files into SQL table. The main issue is that those XML files have mixed content that is not supported through XML Source. To overcome this issue i used XML Task with XSLT Operation Type on Input as follows:
And then simply Data flow tasks to transfer data to SQL Server:
Up to this point (for one file) the solution works.
But i have more files then one so i would like to use ForEach Loop Container but i just can't configure it to make it work. I'm trying to loop over XML Files and pass files to XML Task:
Configuration of a container:
I used two variables:
varSourceFolder - assigned to Directory expression (points to source with xml files)
FileName - should be used to get file name from enumeration.
Then in XML Task i'm using one more expression assigned to Source property which concatenates two previous variables varSourceFolder+FileName.
But it seems that each time variable FileName is empty.
I've tried a lot of things, no success. I would much appreciate your help.
Regards,
Luk
December 22, 2020 at 4:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
February 15, 2021 at 4:02 pm
Not sure if you got this figured out yet but it looks like the issue is your XML Task has a hardcoded SOURCE file. That needs to be a variable that the Loop Container populates so you get the new file name each time.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply