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 2008 Forums
 SSIS and Import/Export (2008)
 pass the path of the file to ssis package

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2011-12-09 : 11:08:46
Hi,
1- ssis package downloads data from a file into sql server table.
1- There is a xml configuration file which has the variables.
2- The ssis package uses this .xml file to read variables.
3- One of the variables in the .xml file is the path of the file to be downloaded.
4- The user uses a UI to execute this package by calling a job which calls the package and it works ok.
5- If the user wants to download a file from a different path to that in the config file then I have to change the path in the config file manually first.

Question:
How is it possible so that the package can take the path being passed from the UI by the user ?
Thanks

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-12-09 : 11:58:31
Create a variable for the path.
The user can then execute the package setting the variable.
Put an expression on the variable set by the config to set it to the value of the user input if input.
If you are setting the path directly from the config then I would change it to set a variable and use the combination of the two variables to set the path. Also makes it easier to use the path in several places if you need to.
Need to check the order of the processing.

I haven't used config files for a long time - I set variables on execution - using a loader if necessary nad get the values from a table.
When I did use config values I would set variables from them anyway so they could easily be logged.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2011-12-09 : 17:35:05
Not sure what you mean.
Please elaborate.
Go to Top of Page
   

- Advertisement -