engine:import:extract
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
engine:import:extract [2018/08/14 22:43] – created dcumming | engine:import:extract [2025/01/21 22:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | extract | + | ====== Extract |
- | + | ||
- | ==== Extract ==== | + | |
Extract a field from a record, CSV element or SQL field. | Extract a field from a record, CSV element or SQL field. | ||
- | ==== Phase ==== | + | ===== Phase ===== |
This instruction is used by the TapeTrack Import Engine. | This instruction is used by the TapeTrack Import Engine. | ||
- | ==== Syntax ==== | + | ===== Syntax ==== |
- | **Extract**//(field, offset, length, record);// | + | '' |
+ | |||
+ | ^ Variable ^ Type ^ Description ^ Min Length ^ Max Length ^ Min Value ^ Max Value ^ | ||
+ | |field| String | The field to be set by this extraction.|1|128| | | | ||
+ | |offset| Integer | 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.|1|10|-214748364 |2147483647| | ||
+ | |length| Integer| The length of the data to be extracted if the data is text based, or the maximum data length for CSV or SQL data.|1|10|-214748364 |2147483647| | ||
+ | |record| Integer|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.|1|10|-214748364 |2147483647| | ||
+ | |||
+ | ===== Example ===== | ||
+ | Extract VOLUME field from offset 10, length 6 of the body of a report. | ||
+ | < | ||
+ | Extract(VOLUME, | ||
+ | </code> | ||
- | // | + | Extract VOLUME |
- | //integer offset;//\\ | + | < |
- | //integer length;//\\ | + | SetCSVDelimiter("," |
- | //integer record;//\\ | + | Extract(VOLUME, |
+ | </code> | ||
- | |field| The field to be set by this extraction.| | + | Extract REPOSITORY |
- | |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.| | + | Extract(REPOSITORY, |
- | |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 | + | ===== See Also ===== |
- | **Extract: Extract VOLUME field from offset 10, length 6 of the body of a report.** | + | |
- | |Extract(VOLUME, | + | |
- | ==== Example ==== | + | [[engine:import|Import Engine Functions]] \\ |
- | **Extract: Extract VOLUME field from the 2nd element of a CSV file.** | + | [[cli: |
- | |SetCSVDelimiter("," | + | [[cli: |
- | |Extract(VOLUME, | + | |
- | ==== Example ==== | + | {{tag> import_engine sync_engine}} |
- | **Extract: Extract REPOSITORY field from offset 70, length 4 of the 3rd record of a header.** | + | |
- | |Extract(REPOSITORY, | + |
engine/import/extract.1534286615.txt.gz · Last modified: 2025/01/21 22:07 (external edit)