There is one package that all it does is move files from one location to another.
Now there are parameters which is stored in a SQL Server table which identifies different locations.
The goal is that there will be different SQL Server Agent jobs that will be scheduled and run the same SSIS package. But the key here is that depending on the parameters that are used as inputs based on which SQL Server Agent job runs the parameters will have a different value which will update the SSIS package to move files to the correct location.
For example: there is a variable called Location
which can hold parameter values depending on the type of job that is run. Let's say there are 2 values right now first and second.
When you run agentjobfirst
, you will only get the parameter which in this case is "first" which will be stored in the Location
variable.
Then it will run the job and move firstFile to drop/first/firstFile.txt
When you run agentjobsecond
, you will only get the parameter which in this case is "second" which will be stored in the Location
variable.
Then it will run the job and move secondFile to drop/second/secondFile.txt
The agentjobfirst
cannot call secondFile
since it's not the right parameter value.
How do I do this?