0

I have to import a CSV file into a table that has 75 columns. The Flat File connection defaults all the columns to 50 character strings. Some of the fields are much smaller and some are 255. The only solution I've found so far to match the Flat File connection columns to the schema of the table is to manually update each column in the connection and then again in the Flat File Data Source in the Data Flow.

There has to be a better way.

0

1 Answer 1

1

The .dtsx file is XML and you can edit it directly. Just right-click the .dtsx and select "View Code". Then you can bulk edit or search and replace the values. eg

enter image description here

You can also have the Flat File source sample your data to suggest types, including adding padding to string columns.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.