Writing Empty Fields for Unconnected Ports in Fixed-Width File Definitions
Writing Empty Fields for Unconnected Ports in Fixed-Width File Definitions
The Integration Service does not write data in unconnected ports to fixed-width files. For example, a fixed-width flat file target definition contains the following ports:
EmployeeID
EmployeeName
Street
City
State
In the mapping, you connect only the EmployeeID and EmployeeName ports in the flat file target definition. You configure the flat file target definition to create a header row with the output port names. The Integration Service generates an output file with the following rows:
EmployeeID
EmployeeName
2367
John Baer
2875
Bobbi Apperley
If you want the Integration Service to write empty fields for the unconnected ports, create output ports in an upstream transformation that do not contain data. Then connect these ports containing null values to the fixed-width flat file target definition. For example, you connect the ports containing null values to the Street, City, and State ports in the flat file target definition. The Integration Service generates an output file with the following rows: