There is a set of functions you can use to fill records with some special, pre-defined values (e.g. name of the file you are reading, size of the data source etc.). These functions are available in
→ →The following functions are supported by most Readers, except ParallelReader, QuickBaseRecordReader, and QuickBaseQueryReader.
The ErrCode
and ErrText
functions
can be used only in the following components: DBExecute, DBOutputTable,
XMLExtract.
Note a special case of true
autofilling
value in MultiLevelReader component.
default_value
- value of corresponding data
type specified as the
Default property is set if no value is read by the Reader.
global_row_count
. This function
counts the records of all sources that are read by one
Reader. It fills the specified field of any numeric data
type in the edge(s) with integer numbers sequentially. The records are numbered in the same order they are
sent out through the output port(s). The numbering starts at 0. However, if data
records are read from more data sources, the numbering
goes continuously throughout all data sources. If some edge does not include such field (in XMLExtract, e.g.),
corresponding numbers are skipped. And the numbering continues.
source_row_count
. This function
counts the records of each source, read by one
Reader, separately. It fills the specified field of any numeric data
type in the edge(s) with integer numbers sequentially. The records are numbered in the same order
they are sent out through the output port(s). The records of each source file are numbered
independently on the other sources. The numbering starts
at 0 for each data source. If some edge does not include such field (in XMLExtract, e.g.),
corresponding numbers are skipped. And the numbering continues.
metadata_row_count
. This function
counts the records of all sources that are both read by one
Reader and sent to
edges with the same metadata assigned. It fills the specified field of any numeric data
type in the edge(s) with integer numbers sequentially. The records are numbered in the same order they are
sent out through the output port(s). The numbering starts at 0. However, if data
records are read from more data sources, the numbering
goes continuously throughout all data sources.
metadata_source_row_count
. This
function counts the records of each source that are both read by
one Reader and sent to
edges with the same metadata assigned. It fills the specified field of any numeric data
type in the edge(s) with integer numbers sequentially.
The records are numbered in the same order they are
sent out through the output port(s). The records of each source file are numbered
independently on the other sources. The numbering starts
at 0 for each data source.
source_name
. This function fills
the specified record fields of string data type with the
name of data source from which records are read.
source_timestamp
. This function
fills the specified record fields of date data type with
the timestamp corresponding to the data source from which
records are read. This function cannot be used in
DBInputTable.
source_size
. This function fills
the specified record fields of any numeric data type with
the size of data source from which records are read. This
function cannot be used in
DBInputTable.
row_timestamp
. This function
fills the specified record fields of date data type with
the time when individual records are read.
reader_timestamp
. This function
fills the specified record fields of date data type with
the time when the reader starts reading. The value is the
same for all records read by the reader.
ErrCode
. This function fills the
specified record fields of integer data type with error
codes returned by component. It can be used by
DBOutputTable and
DBExecute components only.
ErrText
. This function fills the
specified record fields of string data type with error
messages returned by component. It can be used by
DBOutputTable and
DBExecute components only.
sheet_name
. This function fills
the specified record fields of string data type with name
of the sheet of input XLS(X) file from which data records are
read.
It can be used by SpreadsheetDataReader
component only.