The Data Integration Service can update the column metadata for the flat file automatically based on the column position.
The Data Integration Service dynamically updates the column metadata for the flat file based on the row that you specify to start the import in the format properties of the flat file. The default data type, precision, and scale is used for the column metadata for the run-time columns without changing the column position.
To generate column names automatically at run time, select
Automatically (Field1, Field 2...)
for the
Generate Run-time Column Names
property in the Advanced properties of the flat file data object. You must also configure the Read transformation to get the column metadata at run time.
For example, you want to configure a flat file data object to accept changes at run time. The data in the flat file determines the column metadata based on the column position. You have defined a flat file data object with the columns
Dept, Name, Place
. You want the Data Integration Service to dynamically construct the column metadata for the flat file at run time.
The input file contains the following information:
In the Format properties, you configured the flat file data object to start the import of data from line 1. Since there are five columns in the first row, the Data Integration Service processes the flat file data object with five columns. The Data Integration Service creates additional run-time columns in the flat file data object with unique names based on position, Field4 and Field5. The Data Integration Service does not process the additional columns in the second row.
When you add a flat file data object to a mapping, configure the Read transformation to get column metadata at run time. At run time, the Data Integration Service constructs the flat file data object and process the rows in the flat file with the following values:
Dept Name Place Field4 Field5
HR Bob Chicago US 87675
Finance Mary California US 65437