• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Use lookups to query table data

When you upload CSV-format lookup tables, you can use the lookup() function to access that data in your NRQL queries. You can use lookup tables to help you parse telemetry data and customize your data groupings.

Basic query syntax

The following lookup query shows the basic syntax for this function using a table named storeNames and selecting all the data from that table:

FROM lookup(storeNames)
SELECT *

This query selects specific attributes from that same table:

FROM lookup(storeNames)
SELECT store_ID, store_name, description

Query limits

Lookup tables support a higher LIMIT when querying than other NRQL data types do. You can set a LIMIT of up to 20,000 when using a lookup table within a query, subquery, and nested aggregation.

Dica

When you use a lookup table within a subquery, the outer query LIMIT is bound by the standard maximum value unless it also uses a lookup table.

Technical limitations

  • You can't use lookup data with NRQL alert conditions.
  • You can only query lookup tables from the account you uploaded the lookup table in.
  • The following NRQL clauses aren't supported with lookup queries:
    • TIMESERIES
    • COMPARE WITH
    • EXTRAPOLATE
    • Note: You can use these clauses if you contain the lookup query in an inner query. See this query for an example.

Lookup examples

Lookup tables allow you to use queries that combine data with your New Relic-stored telemetry data.

Here are some query examples:

Copyright © 2024 New Relic Inc.

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