lookuptable
Enumerates and outputs the data stored in a lookup as records.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | Read permission on the lookup |
| 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 lookup to look up
[FIELD, ...]- List of fields to output. Multiple fields can be specified separated by commas (
,). If omitted, all fields of the lookup are output.
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
20705 | lookuptable 조회 대상의 이름을 입력해야 합니다. | When the lookup name is not specified |
20706 | [name]은 존재하지 않는 룩업 테이블 이름입니다. | When a non-existent lookup name is specified |
20707 | [name]은 데이터 조회가 지원되지 않는 룩업 테이블 이름입니다. | When the lookup does not support data enumeration |
20708 | [name]에 대한 lookuptable 권한이 없습니다. | When there is no read permission for the lookup |
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 lookup is specified |
Runtime errors
N/A
Description
The lookuptable command enumerates and outputs data stored in a lookup as records. While the lookup command looks up values from a lookup using the key field of input records, the lookuptable command outputs the entire data of a lookup as records.
You can paginate using the offset and limit options. When a field list is specified, only those fields are output.
Only lookups that support data enumeration can be used.
Examples
-
Retrieve all data from a lookup
lookuptable ip_assetOutputs all records from the
ip_assetlookup. -
Retrieve only the top N records
lookuptable ip_asset limit=10Outputs up to 10 records from the
ip_assetlookup. -
Apply offset and limit
lookuptable ip_asset offset=100 limit=50Skips the first 100 records from the
ip_assetlookup and outputs the subsequent 50 records. -
Retrieve specific fields only
lookuptable ip_asset ip, hostname, departmentOutputs only the
ip,hostname, anddepartmentfields from theip_assetlookup.