Connectors

Text Files

The Text file provider in Data Sync is a read-only provider and this provider returns a single column __line that represents each line in the Text document.

You can then use Calculated or Dynamic Columns to extract the parts of the line string you need into new columns.

Calculated Columns includes the function SUBSTR which can be used to extract from the string based on positional index.

For example assuming a fixed-width input file like this below we can see we have 3 columns ID, Name and Price.

1   Product1       1234.45
2   Product2       7890.12
3   Product3         45.00

Extracting the Positional Indexes for each row we can see that the file can be described as follows.

Column DataType Position Length
ID Integer 0 4
Name String 4 15
Price Decimal 19 7

Connect to TEXT File

Authentication

Specifies network credentials when using Web URL to load the TEXT file via HTTP.

FileName

The Path and Filename to the TEXT File, without a Path the current directory is used.

Supports wild cards so *.txt would force Data Sync to load all TEXT files in the directory.

Supports a Web Uri to load the TEXT file from an HTTP Source i.e. http://yourserver/reportdata?format=txt the Authentication settings are used with a Web Uri.

TextEncoding

The Text Encoding scheme to use UTF8 includes BOM

SearchInFolders

When using Wildcard filenames this specifies whether the search will include subfolders.

Line

This is each line from your file that is injected into your schema.

SourceFileName

This is a special column that is injected into your schema and will return the filename of the TEXT document. This is especially useful when using wildcard filenames.

Columns

Add your columns via Calculated or Dynamic Columns by parsing out the part of the input string __Line your interested in. In our example we are using the SUBSTR function with Calculated Columns.

ID Column Name Column Price Column

Result

The result of this file in Data Sync preview window.

TEXT File results