SSIS designation and path to the container container loop directory and then unzip the files

I have a folder with several files named

P04_20140326_1234.zip
P04_20130324_58714.zip
P04_20130808_jurhet.zip
P04_20130815_85893.zip
etc

The name is in the format P04_systemdate _ *. zip.

I want to select the folder containing currentdate in the name, and unzip it first and load the data from the extracted file into the table.eg file: the file named A.txt goes to table A, filenamed as B goes to table B and so on ...

+4
source share
1 answer

I think you have already done the following:

  • Add Data Flow
  • Inside the data stream add flat file sourceandOle_DB destination
  • flat file source, , .

, For-Each

  • ( ) CsvFileName
  • ForEach loop ( For)
  • Foreach File Enumerator
  • *.csv
  • Variable "User:: CsvFileName" 0 - , , Foreach, .
  • () FlatFileSource
  • DelayValidation "True"
  • "",
  • ConnectionString "CsvFileName"

. . , , :

  • FilterDate
  • , (, 20140322)
  • ForEach "", "",
  • FileSpec "*" + @[User::FilterDate] + "*.csv"

, .

+12

Source: https://habr.com/ru/post/1533615/


All Articles