lookuptable
Enumerates and outputs the data stored in a mapping table as records.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | Read permission on the mapping table |
| License usage | Non-licensed command |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
Options
offset=LONG- Number of records to skip. Only natural numbers are allowed.
limit=LONG- Maximum number of records to retrieve. Only natural numbers are allowed.
Target
TABLE- Name of the mapping table to look up
[FIELD, ...]- List of fields to output. Multiple fields can be specified separated by commas (
,). If omitted, all fields of the mapping table are output.
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
20705 | lookuptable 조회 대상의 이름을 입력해야 합니다. | When the mapping table name is not specified |
20706 | [name]은 존재하지 않는 룩업 테이블 이름입니다. | When a non-existent mapping table name is specified |
20707 | [name]은 데이터 조회가 지원되지 않는 룩업 테이블 이름입니다. | When the mapping table does not support data enumeration |
20708 | [name]에 대한 lookuptable 권한이 없습니다. | When there is no read permission for the mapping table |
20709 | lookuptable의 offset 옵션 값은 자연수만 허용됩니다. | When the offset value is 0 or less, or not a number |
20710 | lookuptable의 limit 옵션 값은 자연수만 허용됩니다. | When the limit value is 0 or less, or not a number |
20711 | [name]은 조회 불가능한 룩업 테이블 필드입니다. | When a field that does not exist in the mapping table is specified |
Runtime errors
N/A
Description
The lookuptable command enumerates and outputs data stored in a mapping table as records. While the lookup command looks up values from a mapping table using the key field of input records, the lookuptable command outputs the entire data of a mapping table as records.
You can paginate using the offset and limit options. When a field list is specified, only those fields are output.
Only mapping tables that support data enumeration can be used.
Examples
-
Retrieve all data from a mapping table
lookuptable ip_assetOutputs all records from the
ip_assetmapping table. -
Retrieve only the top N records
lookuptable ip_asset limit=10Outputs up to 10 records from the
ip_assetmapping table. -
Apply offset and limit
lookuptable ip_asset offset=100 limit=50Skips the first 100 records from the
ip_assetmapping table and outputs the subsequent 50 records. -
Retrieve specific fields only
lookuptable ip_asset ip, hostname, departmentOutputs only the
ip,hostname, anddepartmentfields from theip_assetmapping table.