Skip to main content

Fixed-width

This page describes the Fixed-width-specific properties that appear in the Properties tab of Source gems. These settings are the same for fixed-width files regardless of which connection type is configured in the gem (for example, S3, SFTP, or SharePoint).

info

Writing fixed-width files using a Target gem is not supported.

If you need details on configuring a Source gem end to end (including all tabs such as Location), see the documentation for the specific file storage connection:

Properties

Source schema

Define the schema of your dataset in the Properties tab of the gem. This determines the structure of your dataset.

info

You must define the schema manually for fixed-width files. Schema inference isn't supported.

Each row in the Schema table corresponds to a fixed-width column in the file and includes the following attributes:

FieldDescription
NameName of the column.
TypeType of data in the column.
OffsetStarting character position in the row for this column.
LengthNumber of characters for this column.
MetadataAdditional information about the column. Some data types require certain metadata fields.

Metadata fields

Hover over a row in the Schema table to reveal a dropdown arrow next to the Metadata field. Use this dropdown to add column details, such as a description or tags. Metadata is optional for the majority of data types but is sometimes required.

The tables below list metadata fields specific to certain data types per SQL warehouse provider:

Data typeSpecific metadata fieldsRequired
ArrayNumber of occurrences: Number of elements in the array.Yes
DecimalScale: Number of digits after the decimal point.No
DateFormat: Expected format of the date that can override the global default at the column level.No
TimeFormat: Expected format of the time that can override the global default at the column level.No
TimestampFormat: Expected format of the timestamp that can override the global default at the column level.No
note

For a complete list of supported data types, visit Supported data types.

Source properties

The following properties are available to customize how how fixed-width files are read.

PropertyDescriptionDefault
DescriptionDescription of the table.None
Line DelimitedWhether each record ends with a newline character.Disabled
Strip Trailing BlanksStrip trailing whitespace from string values when reading the data.Disabled
Number of Initial Rows to SkipNumber of lines to skip before the data begins, usually 1 for the header row.0
Number of Bytes to Skip Between RowsUsually used by the Transpiler.0
Date Format ReferenceGlobal default format for parsing date columns.2006-01-02
Time Format ReferenceGlobal default format for parsing time columns.15:04:05
Timestamp Format ReferenceGlobal default format for parsing timestamp columns.2006-01-02 15:04:05
Decimal PointCharacter used as a decimal point..