On this page
inputlookup command
Search a lookup table's own rows instead of events. Must be the first thing in the query.
Searches a lookup table's own rows instead of stored events. Every column of the table becomes a column of the result, typed the way the table declares it.
Use it to ask questions about the reference data itself: which hosts a team owns, which accounts have no owner, or how many rows there are per region.
Syntax
ObiQL
| inputlookup <table>Square brackets mark an optional part, and angle brackets a value you supply.
Arguments
| Argument | Required | Description |
|---|---|---|
<table> | Required | The name of a lookup table in this workspace. Quote a name that contains a space: | inputlookup "Prod Hosts". |
Usage
- It must be the first thing in the query. Nothing, not even a search filter, may come in front of it, because there are no events for that filter to match.
- where, eval, sort, limit, dedup, rename, fields and stats work on the table's rows exactly as they do on events.
- timechart, json, extract, lookup and delete do not apply to a table's rows and are refused: rows have no timestamps, their columns are already separate values, and delete only removes events.
- Alert rules, liveness checks and public dashboard panels cannot use inputlookup. Run it from the Explorer or a dashboard.
Examples
1. List every row of a table
ObiQL
| inputlookup hostname_mapReturns the table's rows with all of its columns.
2. Filter a table's rows
ObiQL
| inputlookup hostname_map | where owner_team=paymentsKeeps only the hosts the payments team owns. A filter goes after the stage as | where.
3. Summarise a table
ObiQL
| inputlookup hostname_map | stats count() by regionCounts the table's rows in each region.