Read commands
- Last UpdatedAug 25, 2026
- 12 minute read
Read commands read from different data sources and formats and pump records into the pipeline, as shown in the following diagram. Multiple Read commands may be used within a pipeline which pump records into the next FilterCommand.

-
Read file can be supplied with multiple formats with where conditions to determine which format is being read.
-
Tabular sources support a common set of configurations to define the action to be taken when records have missing fields or have extra fields and specifies a header range such as rows 3:5.
-
EIWM is currently restricted to read objects and datasets (not arbitrary associations since those need translation to an attribute).
Reading records
Reading records is accomplished through the Read Command, which reads data from a source Endpoint (for example, a database or file of some format) and emits records into the pipeline.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Endpoint |
N/A |
Begin |
[SettingRequired] The read endpoint is used to emit records |
Multiple readers may be used within a single pipeline configuration. In this case, a reader will output results to the next filter that is, the next non-read command, so the following reads the first 1000 rows from, for example, yam1.csv, the first 500 objects from yam*_null.xml, and write up to 1500 rows to the output.txt file:
Example - Multiple Readers
<pipeline>
<read output-limit="1000">
<file folder="input" file="yam1.csv">
<text template="csv" />
</file>
</read>
<read output-limit="500">
<file folder="input\eiwm" file="yam*_null.xml">
<eiwm />
</file>
</read>
<write>
<file folder="output" file="output.txt">
<text template="tab" />
</file>
</write>
</pipeline>
Read Endpoints
This section describes the endpoints from which data may be read.
Range
The range endpoint emits an inclusive range of numbers between minimum and maximum values, either in an ascending or in a descending order, depending on whether the minimum or maximum range is higher.
The following table lists the range endpoint parameters.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
From |
IExpression <int> |
Begin |
[SettingRequired] Starting value |
|
To |
IExpression <int> |
Begin |
[SettingRequired] Ending value |
|
Step |
IExpression <int> |
Begin |
[SettingDefault(1)] Increment |
The following table lists the range record attributes.
|
Attribute |
Description |
|---|---|
|
Index |
Number |
-
Read from 1 through 10 with step 2 will yield 1, 3, 5, 7, 9.
-
Read from -1 through -10 with step -3 will yield -1, -4, -7, -10.
-
Read from -10 through -5 with step 1 will yield -10, -9, -8, -7, -6, -5. Read from -1 through 10 with step 1 would be a mistake.
Initiate a Pipeline using Range Template One
Either of these will emit one item in the pipeline, so it may be used to artificially initiate processing.
Example:
<read template="one" />
<read>
<range template="one" />
</read>
This endpoint may be used with the following projections to generate data from a loaded information standard (for example, to list all enumerations).
File
The file endpoint will read 0-n files of one or more formats and emit records into the pipeline.
The following table lists Read File Endpoint Parameters:
|
Parameter |
Value |
Phase |
Description |
|
Folder |
IExpression <string> |
Begin |
[SettingRequired] Folder, may use wild card *,? Patterns to read from multiple folders. Folder is separate from File to avoid ambiguity. |
|
File |
IExpression <string> |
Begin |
[SettingRequired] File to read, may use wild card *,? Patterns to read from multiple files. |
|
Report-Progress |
IExpression <bool> |
Execute |
Evaluated per file and defaults to false โ reports incremental progress of reading each file as a % based on stream position. |
|
Recurse |
IExpression <bool> |
Execute |
[SettingDefault(False)] True, if the read recourse through sub folders. |
|
When-File-Errors |
IExpression <ReadFileErrorHan dling> |
Execute |
[SettingDefault(ErrorNow)] Action to take when a file causes an error. ErrorNow Stop processing immediately and error. ErrorLater Process all files then error. Warn Raise a warning and continue. Ignore Continue. |
|
Format |
ReadFormatConfig[] |
Begin |
1-n Formats (see below). |
Read several file formats
The following example detects which reader to use from a few choices โ if none of the readers is selected, a file is skipped. A special skip format may be used to indicate skipping certain files.
Example:
<read>
<file
folder="{{ $[source-data] }}\data load\*"
file="*.*"
report-progress="true">
<skip where="{{ $[file.extension] in ['exe', 'dll'] }}" />
<text template="tab" where="{{ $[file.extension] in ['txt', 'tab'] }}" />
<text template="csv" where="{{ $[file.extension] in ['csv'] }}" />
<excel header-row="1" where="{{ $[file.extension] in ['xlsx'] }}" />
<eiwm where="{{ $[file.extension] in ['xml'] and $[file.name] contains '_' }}" />
</file>
</read>
Record output is determined by the format reader. Reading a table of results from Excel, for example, will include all headers. To limit the attributes to a subset, a subsequent projection filter would be used.
Directory
The directory endpoint reads file or folder records from a directory.
Most settings are evaluated in Execute phase, for example, Recurse is evaluated for every folder read, meaning that if the expression includes the folder path/name, this rule may vary per folder processed.
The following table lists read directory endpoint parameters.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Folder |
IExpression <string> |
Begin |
Folder, may use wild card *,? Patterns to read from multiple folders. |
|
Recurse |
IExpression <bool> |
Execute |
True, if you want to recurse through sub folders. |
|
Filter |
IExpression <string> |
Execute |
Filter for directory/file names. |
|
Include-Directories |
IExpression <bool> |
Execute |
True, if output should include directories. |
|
Include-Files |
IExpression <bool> |
Execute |
True, if output should include files. |
|
Include-Storage-Checksum |
IExpression <bool> |
Execute |
True, if output for files should include a checksum. |
The following table lists the read directory record attributes.
|
Attribute |
Description |
|
name |
Name of the file or folder. |
|
fullname |
Full path to the file or folder. |
|
bytes (files only) |
Number of bytes the file occupies. |
|
parentfolder |
Parent folder full path of the file or folder. |
|
storagechecksum (files only) |
[optional] MD5 checksum of file. |
|
storagechecksumtype (files only) |
[optional] defaults to MD5 *1. |
|
filecount (folders only) |
Count of files in this folder. |
|
foldercount (folders only) |
Count of sub folders in this folder. |
SQL Server
The SQL server executes an SQL query to retrieve records.
The following table lists read SQL server endpoint parameters.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Connection-String |
IExpression <string> |
Begin |
[SettingRequired] The SQL connection string. |
|
Query |
IExpression <string> |
Begin |
[SettingRequired] The SQL Query to run. |
|
Timeout |
IExpression <uint> |
Begin |
[SettingDefault(60)] Timeout for the query to complete. |
|
Date-Time-Format |
IExpression <string> |
Begin |
[SettingDefault(yyyy-MM-ddTHH:mm:ss)] Defaults to ISO - |
|
Include-Binary |
IExpression <bool> |
Begin |
[SettingDefault(false)] 2.5.2+ If true, blob data types such as varbinary will be included. |
|
Binary-Format |
IExpression <BinaryString Format> |
Begin |
[SettingDefault(BinBase64)] 2.5.2+ BinBase64 Encode binary in BinBase64 format. UTF8 Encode binary in UTF8 format. This format exists because the current application only supports storing text data in attributes note. |
Records output are determined by the SQL query.
OleDB
The OleDB endpoint executes an SQL query against an OleDB source and emits records.
The following table lists read OleDB endpoint parameters.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Connection-String |
IExpression <string> |
Begin |
[SettingRequired] The SQL Connection String. |
|
Query |
IExpression <string> |
Begin |
[SettingRequired] The SQL Query to run. |
|
Timeout |
IExpression <uint> |
Begin |
[SettingDefault(60)] Timeout for the query to complete. |
Records output are determined by the SQL query.
OleDB is not on the known roadmap to be supported within .NET core, so currently there is no anticipated support for LINUX. Hence, it might be nice to drop this. Specific Excel and SQL readers (already existing) and Oracle reader will be needed, though most access now is via REST or WSDL api.
Class library
The ClassLibrary endpoint provides the ability to interrogate a currently loaded class library and output information (including extensions) to a structured, tabular form for simple processing.
The following table lists read class library endpoint parameters.
|
Parameter |
Value |
Phase |
Description |
|
Artefact-Type |
IExpression <ArtefactType> |
Begin |
[SettingRequired] The type of class library entity to read. Attribute Class ClassAttribute Enumeration Lifecycle Measure Unit Taxonomy |
The following table lists the read class library record attributes.
|
Attribute |
Description |
|---|---|
|
ID |
NA |
|
Name |
NA |
|
Description |
NA |
|
Others dependent on ArtefactType |
NA |
Read class library attributes
Example:
<read>
<class-library artefact-type="Attribute" />
</read>
<where condition="{{ @ID.getAttributeExtension(':validationType') equals 'association' }}" />
<select>
<fields>
<field name="AttributeID" value="{{ @ID }}" />
<field
name="AssociationType"
value="{{ @ID.getAttributeExtension(':validationRule').slice('::', 1).toLower() }}" />
<field
name="AssociationClass"
value="{{ @ID.getAttributeExtension(':validationRule').slice('::', -1).toUpper() }}" />
<field
name="HAVD"
value="{{ @ID.getAttributeExtension('cvx:Engineering_Portal/HAVD') }}" />
</fields>
</select>
Configuration
Provides the reflective ability to interrogate loaded templated configurations and output some simple information about them.
The following table lists read configuration endpoint parameters.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Type |
IExpression <string> |
Begin |
Comma separated list of types of configuration to include. |
The following table lists the read configuration record attributes.
|
Attribute |
Description |
|---|---|
|
Name |
NA |
|
Type |
NA |
|
Description |
NA |
A key scenario for this is the ability to process an arbitrary number of information interfaces defined in ISM from a standard configuration, so that new interfaces may be added via ISM.
Read template configurations for read and select commands
Example:
<read>
<configuration type="read, select" />
</read>
Waypoint
The waypoint endpoint reads data from a Waypoint and emits records.
A waypoint is used to aggregate and track deltas of updates and handle partial loads as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Folder |
IExpression <string> |
Begin |
[SettingRequired] Required folder indicating the waypoint database folder to use, may use wild card *,? patterns to read from multiple waypoints. |
|
After |
IExpression <DateTime> |
Begin |
[SettingOptional] Optional, and if specified then instructs to only retrieve changes after the specified date. Default of nothing retrieves all latest data. |
|
Where |
IExpression <bool> |
Execute |
[SettingOptional] Evaluated for each waypoint source (that is, folder in the default implementation) being processed to determine if that waypoint source should be included or skipped. |
|
Include-Content |
IExpression <bool> |
Begin |
[SettingOptional] |
|
Include-Deleted |
IExpression <bool> |
Begin |
[SettingOptional] |
|
Include-Deleted-Content |
IExpression <bool> |
Begin |
[SettingOptional] |
|
Recurse |
IExpression <bool> |
Begin |
[SettingOptional] |
Read a waypoint
Example:
<read>
<waypoint folder="{{ $[waypoint-root] }}\master\operational" />
</read>
All read formats
All read formats may specify common parameters as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|
Where |
IExpressi on <bool> |
Execute |
The first format with a where condition evaluating to true is used. This allows for example, a read format to be selected by file extension. This is evaluated per file and so may use file and folder variables. and defaults to true. |
A special skip format is available which indicates to skip processing.
Tabular read formats
Tabular formats include Excel, Delimited Text, HTML Table and have a common set of configuration options in addition to format specific options as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Header-Row |
IExpression <string> |
Begin |
[SettingDefault(1)] A row or range specification to read headers from. A range may be specified using N:M notation, for example, 5:10 for rows 5 to 10. |
|
First-Data-Row |
IExpression <uint> |
Begin |
[SettingDefault(0)] Default is 0 which means the row after the header row(s). |
|
Allow-No-Content |
IExpression <bool> |
Begin |
[SettingOptional] If true, error if there is no content. |
|
Allow-No-Header |
IExpression <bool> |
Begin |
[SettingOptional] If true, error if there is no header. |
|
Allow-Zero-Byte- Stream |
IExpression <bool> |
Begin |
[SettingOptional] If true, error if an incoming stream is 0 bytes. |
|
When-Too-Few-Fields |
IExpression <TableReading WhenTooFewFie lds> |
Begin |
[SettingDefault(ErrorNow)] Specifies what to do when there are fewer fields than expected. If a header is specified, that is the expected number of fields, otherwise, the first row determines the expected number. |
|
ErrorNow ErrorLater Skip record and error now or after the table Warning Warn and include the record Accept Include the record (similar to excel) |
|||
|
When-Too-Many- Fields |
IExpression <TableReading WhenTooManyFi elds> |
Begin |
[SettingDefault(ErrorNow)] What to do when more fields are encountered than expected. If a header is specified, that is the expected number of fields, otherwise, the first row determines the expected number. ErrorNow ErrorLater Skip record and error now or after the table. Warning Warn and include the record. AcceptExpected Include the record but ignore extra attributes. AcceptExtra Include the record with all attributes. Additional field names are F{N} format. |
|
Header-Whitespace |
IExpression <Table HeaderWhitespa ce> |
Begin |
[SettingDefault(Normalise)] This configuration makes it simpler to process information, in particular when headers are stitched together from multiple rows. None Do nothing Trim Trim surrounding whitespace Normalise Remove excess whitespace and control characters, and convert new lines and tabs to a single space, for simpler use in processing. |
|
Header-Reduce |
IExpression <Table HeaderReduce> |
Begin |
[SettingDefault(None)] None Do nothing Ascii Remove all non-ascii characters. |
|
This could be replaced by a header expression function (which could use an ASCII function to do the same, and allow more options). |
Excel
Read excel format reads an OpenXML XLSX file format or legacy BIFF format.
The excel read format uses all tabular format settings as well as Excel-specific configuration as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Include-Sheet |
IExpression <bool> |
Begin |
[SettingDefault(true)] If set, a rule to determine whether or not to include a sheet. |
|
Include-Hidden-Sheets |
IExpression <bool> |
Begin |
[SettingDefault(false)] If set to true, include hidden sheets. |
|
Password |
IExpression <string> |
Begin |
[SettingOptional] If set, the password to use to access a protected Excel workbook. |
|
Iso-Date-Formats |
IExpression <bool> |
Begin |
[SettingDefault(false)] Output dates in ISO 8601 format instead of 'as is' format as seen when viewing in Excel. |
|
Method |
IExpression <ReadExcelMe thod> |
Begin |
[SettingDefault(AutoDetect)] Specify the excel reader implementation to use |
|
AutoDetect |
|||
|
Same as General |
|||
|
OpenXml |
|||
|
Use an OpenXml reader (OpenXML format only) |
|||
|
General |
|||
|
Use ExcelDataReader (see below). |
|||
|
File-Type |
IExpression <ReadExcelFil eType> |
[SettingDefault(AutoDetect)] AutoDetect |
|
|
Detect file type via the file extension (if known). |
|||
|
Excel |
|||
|
Expect to read BIFF or OpenXML. |
|||
|
Csv Specify this if using the Excel format reader to read a CSV file. Tsv Specify this if using the Excel format reader to read a tab separated file. |
The following table lists the read Excel format variables for metadata pinning.
|
Value |
Description |
|---|---|
|
Sheet |
The Sheet name |
|
Sheet.Name |
The sheet name |
|
Sheet.Index |
The numeric index of the sheet |
Read an Excel file with multiple header rows
The following would read an Excel file with headers on rows 2 and 3, thus ignoring row 1 and expecting content to start at row 4:
Example:
<read>
<file folder="input" file="02_TAG_REG.xlsx" report-progress="true">
<excel header-row="2:3" />
</file>
</read>
Read several Excel files (ignoring certain sheets)
The following can read several Excel files, excluding certain sheets:
Example:
<read>
<file folder="input" file="*.xlsx" report-progress="true">
<excel header-row="1" include-sheet="{{ $[sheet.Name] not contains ['ignore', 'me'] }}" />
</file>
</read>
The following table lists the Excel data reader formats.
|
File Type |
Container Format |
File Format |
Excel Version |
|---|---|---|---|
|
.xlsx |
ZIP, CFB+ZIP |
OpenXml |
2007 and newer |
|
.xls |
CFB |
BIFF8 |
97, 2000, XP, 2003 98, 2001, v.X, 2004 (Mac) |
|
.xls |
CFB |
BIFF5 |
5.0, 95 |
|
.xls |
- |
BIFF4 |
4.0 |
|
.xls |
- |
BIFF3 |
3.0 |
|
.xls |
- |
BIFF2 |
2.0, 2.2 |
|
.csv |
- |
CSV |
(All) |
HTML table
The HTML table format reads 1-n HTML tables and emit records.
This format exists because systems have been encountered which export XLS files, however, it turns out these are HTML Table text files, sometimes of a very large size and poorly formatted as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Decode-Html-Text |
IExpression <bool> |
Begin |
[SettingDefault(true)] |
The following table lists read HTML Table format scenarios.
|
Parameter |
Value |
|---|---|
|
ContinuumEdge |
Software used at Origin Energy as commissioning system (CCMS). The HTML is text with tags thrown in and no encoding of content. |
|
OpenText |
Older version used at Origin Energy, managed by vendor, with no CMIS option. The HTML is text with tags thrown in and no encoding of content. |
Text delimited
Reads a text delimited file such as CSV or TAB delimited. By default, this applies strict rules as per RFC4180 to protect against the fact that many CSV formats are not well encoded and open to mis-reading.
A set of strict rules are applied to detect potential problems but may be lifted at discretion as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Delimiter |
IExpression <string> |
Begin |
[SettingDefault(,)] The delimiter to use. Note: This may be a multiple character string. |
|
End-Of-Record |
IExpression <string> |
Begin |
[SettingDefault(CRLF)] The end of record terminator. Note: This may be a multiple character string. |
|
Quote |
IExpression <string> |
Begin |
[SettingDefault(")] The quote character to use for explicit text. Note: This may be a multiple character string. |
|
Allow-Run-On- Values |
IExpression <bool> |
Begin |
[SettingDefault(false)] According to strict interpretation of RFC4180, if a quote or end of record or delimiter is used within a value, the value must be surrounded by quotes and content quotes must be double encoded. for example, "12 pipe => ,"""12 pipe", In practice we may encounter text such as: ,"""12 "pipe, In this case, the text pipe is considered a run on. |
The following table lists the Read text format templates.
|
Template |
Description |
|---|---|
|
Csv |
CSV format, first row is header |
|
Csv0 |
CSV format, no header row |
|
Csv1 |
CSV format, first row is header |
|
Tab |
Tab delimited format, first row is header |
|
Tab0 |
Tab delimited format, no header row |
|
Tab1 |
Tab delimited format, first row is header |
Read two sources into a single output
Example:
The following sample XML reads two files and combine them into one output file:
<pipeline>
<read>
<file folder="input" file="input.csv">
<text template="csv" />
</file>
</read>
<read>
<file folder="input" file="input.txt">
<text template="tab" />
</file>
</read>
<write>
<file folder="output" file="output.txt">
<text template="tab" />
</file>
</write>
</pipeline>
BUXML
Reads a BUXML format file as used by AVEVA NET Gatekeeper and AVEVA Change Manager as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Context |
IExpression <string> |
Execute |
[SettingOptional] If set, sets context metadata on each output object. Defaults to {{ if $Discipline then 'DOC' else ''}} |
|
Id |
IExpression <string> |
Execute |
[SettingOptional] If set, sets id metadata on each output object. Defaults to {{ $id }} |
The following table lists the read BUXML format variables for pinning metadata.
|
Parameter |
Value |
|---|---|
|
Envelope.Source.Id |
From BUXML Envelope |
|
Envelope.Source.Name |
From BUXML Envelope |
|
Envelope.Source.Email |
From BUXML Envelope |
|
Envelope.Source.Created |
From BUXML Envelope |
|
Envelope.Source.Created.Date |
From BUXML Envelope |
|
Envelope.Source.Created.Time |
From BUXML Envelope |
|
Envelope.Target.Id |
From BUXML Envelope |
|
Envelope.Target.ProjectOwnerName |
From BUXML Envelope |
|
Envelope.Target.ClassLibraryVersion |
From BUXML Envelope |
|
Facility |
From BUXML Envelope |
|
System |
From BUXML Envelope |
|
Discipline |
From BUXML Envelope |
EIWM (Engineering Information Warehouse Model)
Reads an EIWM format file as used by AIM โ only reads root EIWM Objects and Datasets as listed in the following table.
|
Parameter |
Value |
Phase |
Description |
|---|---|---|---|
|
Remove-Dataset-Suffix |
IExpression <bool> |
Execute |
[SettingDefault(true)] If evaluates to true, ensures that the 'dataset' for an attribute does not end in the text 'dataset'. |
The EIWM reader automatically pins the meta q, $[this.name], $[this.class].