• English日本語한국어
  • Log inStart now

How to query lookup table data

When you upload CSV-format lookup tables, you can use the lookup() function to access that data in your NRQL queries.

Why use lookup tables?

For why you'd use lookup tables and how to upload them, see Lookup tables.

Basic query syntax

Let's say you've named your table storeNames. This query will select all data from that table:

FROM lookup(storeNames)
SELECT *

This query will select some specific attributes from that same table:

FROM lookup(storeNames)
SELECT store_ID, store_name, description

Query examples

The primary benefit of lookup tables is that you can use queries that combine that data with your New Relic-stored telemetry data.

Here are some query examples:

Technical details about querying

The maximum number of responses returned when using LIMIT is 20,000.

You can't use lookup data for NRQL alert conditions.

The following NRQL functions are not supported with lookup queries:

  • TIMESERIES
  • COMPARE WITH
  • EXTRAPOLATE

But these clauses can be used if the lookup query is contained in an inner query. For an example of this, see this query.

Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.