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.
Specifies network credentials when using Web URL to load the TEXT file via HTTP.
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.
The Text Encoding scheme to use UTF8 includes BOM
When using Wildcard filenames this specifies whether the search will include subfolders.
This is each line from your file that is injected into your schema.
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.
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.
The result of this file in Data Sync preview window.