Reputation: 1
I came across through one complicated situation in SSIS. I need to access 10 Folders which contains .txt files: \Root\Customer 1.txt files (File name and schema are same in all folders) and that should load in different databases. to achieve this, i am using For Each Loop and inside Foreach using Execute package tasks to point each file to the corresponding pacakge.
For Instance, From the \Root Folder if i am processing 'Customer 1' Folder files these data should be loaded into Customer 1 database.
i.e if folder is \Customer 2 --> Customer 2 DB if folder is \Customer 3 --> Customer 3 DB and vice versa. So, as soon as my SSIS selected Customer 1 folder target Database should be set to Customer 1 DB.
Here i am stucked with selecting database name based on customer folder .
Upvotes: 0
Views: 88
Reputation: 4957
You need to define "expressions" in the connection manager which then substitute into server/database.
In you case it folder name on which for each container is working .
Note: donot forget evaluate expression to true.
Upvotes: 1