Text Source block

The Text Source block allows the blueprint to obtain data for simulation purposes from a text file.

Note that this connector may or may not be available on the user palette, according to your license type.

Return to Overview of blocks

NOTE: This block has a discrete source version.  For more information on configuring the discrete version of this block, click here.

Text Source block

Description

The Text source provides the functionality to read/write data from/to a delimited text file (thus supported file-types include, for example, .csv or .txt files).

Text source block

Block Type

Input/Output block

Input/Output ports

The text source has no input ports and one output port.  The fields in the output port can be of any type.

NOTE: When a continuous text source is used for data preparation in the Troubleshooter s, data type detection is carried out on every field. The 100th row of data in each field (or the last row if the dataset has fewer than 100 rows) will determine the data type used for that field.

Functions performed on tags

The following functions are performed on tags by the Text source block.

  • On the values - The text read will be converted to the configured data type.  The following rules apply:

    • The quality will be set to bad when the text cannot be converted to a valid numerical value for integer and floating point data type fields.

    • Empty/NULL values for text fields will result in empty text for the value of the field and the quality will be set to good.

    • Empty/NULL values for integer and floating point data type fields will result in bad quality values

  • On the timestamp - If the text for a date/time column cannot be converted to a valid times-tamp value, the quality will be set to bad.  Note that a full date, hour and minute value for the time is required.  Seconds, milliseconds and microseconds are optional.  If any of the year/month/day/hour/minute values are missing or out of range an error will occur and execution will stop.

  • On the quality - Quality data type columns will be interpreted as follows:

    • Any value not equal to 0 will be set to good quality

    • 0 or values that result in a conversion error will be set bad quality.

Terminology

  • Delimited - This refers to the separation of data elements in a text file by a character or combination of characters. The character that separates the elements is called the delimiter.

  • Delimiter - A character or string used to separate, or mark the start and end of, items of data in, for example, a database, source code, or text file.  The comma is the delimiter in a .csv (Comma Separated Values) file, whilst the tab key is the delimiter in a text (.txt) file   

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025