engine:import:extract
This is an old revision of the document!
Extract
Extract a field from a record, CSV element or SQL field.
Phase
This instruction is used by the TapeTrack Import Engine.
Syntax
Extract(field, offset, length, record);
string field;
integer offset;
integer length;
integer record;
field | The field to be set by this extraction. |
offset | The zero based offset of the data to be extract, or the element index of a CSV element or SQL element. In the event that the data being processed is CSV based, a value of zero indicates that the raw CSV string should be extracted rather than an individual CSV element. |
length | The length of the data to be extracted if the data is text based, or the maximum data length for CSV or SQL data. |
record | The record within a header, if the value is non-zero and the data is text based. A record that is not a header if the value is zero and the data is text based. For CSV and SQL data this argument is ignored. |
Example
Extract: Extract VOLUME field from offset 10, length 6 of the body of a report.
Extract(VOLUME, 10, 6, 0); |
Example
Extract: Extract VOLUME field from the 2nd element of a CSV file.
SetCSVDelimiter(“,”); |
Extract(VOLUME, 2, 6, 0); |
Example
Extract: Extract REPOSITORY field from offset 70, length 4 of the 3rd record of a header.
Extract(REPOSITORY, 70, 4, 3); |
engine/import/extract.1582504007.txt.gz · Last modified: 2025/01/21 22:07 (external edit)