Fixed Width File

Parameter
Value
headerRowsToIgnore
the number of records from the top of the file to ignore before the data starts (includes column header)
footerRowsToIgnore
the number of records from the bottom of the file to ignore
path
the path to the source file to load, this can reference an execution parameter (e.g. @file_path)
encoding
the encoding of the file, defaults to UTF8 if not specified, but also supports UTF8_BOM, ASCII, and UTF16
maxBufferSizer
the maximum buffer size
In the column definitions, add the length="number" attribute to denote the width of the column.
<FixedWidthDataSource
headerRowsToIgnore="1"
footerRowsToIgnore="0"
path="C:\Users\Cinchy\Sample.csv"
encoding="UTF8"
maxBufferSize="10">
<Schema>
<Column name="Name" dataType="Text" maxLength="10" length="10" trimWhitespace="true" />
<Column name="Description" dataType="Text" maxLength="50" length="50" trimWhitespace="true" />
</Schema>
<Filter/>
</FixedWidthDataSource>
You can use trimwhitespace to clean up a fixed width file, the trimming will occur after parsing the columns.
Last modified 1yr ago