Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Global variable for XML Source Editor

Author  Topic 

Neal44
Starting Member

17 Posts

Posted - 2010-04-15 : 13:04:38
Hi,

I have a 2005 SSIS package that reads a specified newwork folder for xml files. The package converts selected xml data into an SQL table.

My concern is that when I execute the task, the package is duplicating data from the 1st file for each xml file found.

The package uses a for-each loop container which polls a directory for each file. Within the container there is:

1. A Script File - This populates a variable (User::fileName) with the current (read) file and extention.

2. Data Flow Task - This uses a XML Source File. Within the Editor pane there is a 'Connection Manager' tab that contains a 'XML Location' field. I have entered the address of the 1st file in this field (location and file name). But this is where the problem is as this doesn't update.

current
XML Location:
\\Server1\ACME\xml\samples\123_ABC.xml

required
XML Location:
\\Server1\ACME\xml\samples\[User::fileName]

Can I pass the name of the variable in this field?

This highlights another problem as each time I amend this field or the xsd, some elements are not recognised and warnings appear on Data Flow objects.

Thanks for any assistance,




Neal
   

- Advertisement -