开发者

SSIS: How can I set variables based on data in a text file?

开发者 https://www.devze.com 2022-12-14 09:22 出处:网络
I have a text file 开发者_运维问答with 5 columns and a variable amount of rows.What would be the easiest way to grab the first row of the text file and set 5 different variables in SSIS to the values

I have a text file 开发者_运维问答with 5 columns and a variable amount of rows. What would be the easiest way to grab the first row of the text file and set 5 different variables in SSIS to the values of the 5 columns in the first row?


  • Define your five variables in the package, and one more for row_count.
  • Setup a Flat File Source.
  • Use Row Count component to count rows.
  • Use Conditional Split on row_count == 1.
  • Use Script Component to capture row data into variables.
0

精彩评论

暂无评论...
验证码 换一张
取 消