Binary File Data Source Example

This page gives an example config for using a binary file as a source

Table of Contents

Table of Contents

1. Connections UI Example

2. XML Example

This example XML uses the following values:

ValueDescriptionExample

SOURCE

The source of your binary file. This can either be a local upload, Amazon S3, or Azure Blob Storage.

"PATH"

PATH

The path to the source file to load.

"@filepath"

headerRowsToIgnore

The number of records from the top of the file to ignore before the data starts (includes column header).

"1"

footerRowsToIgnore

The number of records from the bottom of the file to ignore before the data starts (includes column header).

"1"

ENCODING

The encoding of the file, defaults to UTF8 if not specified, but also supports UTF8_BOM, ASCII, and UTF16

"UTF8"

SOURCE_COLUMN_NAME

The name(s) of your source column(s)

"Name"

DATA_TYPE

The data type of your source column

"Text"

WHITESPACE

This checkbox is an option if your data type is selected as "text"

"true"

IS_MANDATORY

Whether the column is mandatory or not

"false"

VALIDATE_DATA

Whether the column data needs to be validated or not

"false"

PARSE

How you want to parse your content. Either Byte Length, Trailing Byte Sequence, or Succeeding Byte Sequence

"ByteLength"

lengLENGTH

The content length in number of bytes.

"9"

2.1 Blank XML Example

     <BinaryDataSource source="SOURCE" path="PATH" headerRowsToIgnore="" footerRowsToIgnore="" encoding="ENCODING">
        <Schema>
            <Column name="SOURCE_COLUMN_NAME" dataType="DATA_TYPE" trimWhitespace="WHITESPACE" isMandatory="IS_MANDATARY" validateData="VALIDATE_DATA" parseContentBy="PARSE" length="LENGTH"/>
        </Schema>
    </BinaryDataSource>

2.2 Populated XML Example

     <BinaryDataSource source="PATH" path="@filePath" headerRowsToIgnore="1" footerRowsToIgnore="1" encoding="UTF8">
        <Schema>
            <Column name="Name" dataType="Text" trimWhitespace="true" isMandatory="false" validateData="false" parseContentBy="ByteLength" length="9"/>
        </Schema>
    </BinaryDataSource>

Last updated