Hi,
There are around 20 csv files are there in the source files. Out of 20, 15 file names start with 'INDIA' and 5 files start with 'Mexico'.Both have different column names.
My job is to load all the IND files to dbo.Tbl_India and Mexico files to a table called 'dbo.Tbl_Mexico'.
I am trying to use a For Each Loop container with File Enumerator and inside the For each loop container, using a Expression task, checking 'Substring(filename,1,5)='INDIA' and if its success, it will go a DFT, where i load them into concerned tables. I have created 2 flat file conn mgr with Expression pointed to 'User::FileName' as well- But , this is not working. Expression task does not work as expected. I tried with Precedent constraint also - its also not properly separating INDIA and Mexico files.
Can some experts help me please? Basicall I want to separate the filename which is coming from For Each Loop container to INDIA and MEXICO and load into two different tables.
There are around 20 csv files are there in the source files. Out of 20, 15 file names start with 'INDIA' and 5 files start with 'Mexico'.Both have different column names.
My job is to load all the IND files to dbo.Tbl_India and Mexico files to a table called 'dbo.Tbl_Mexico'.
I am trying to use a For Each Loop container with File Enumerator and inside the For each loop container, using a Expression task, checking 'Substring(filename,1,5)='INDIA' and if its success, it will go a DFT, where i load them into concerned tables. I have created 2 flat file conn mgr with Expression pointed to 'User::FileName' as well- But , this is not working. Expression task does not work as expected. I tried with Precedent constraint also - its also not properly separating INDIA and Mexico files.
Can some experts help me please? Basicall I want to separate the filename which is coming from For Each Loop container to INDIA and MEXICO and load into two different tables.