Our lookups feature lets you enrich your log data, and other New Relic-stored data, with data about your business that you define in a CSV file.
Why use lookups?
When you upload a lookup table, you can then use that data to enrich your queries of New Relic data. For example, you might upload a table that maps host IDs to human-readable host names, and then use that to create a chart that displays the human-readable host names.
Lookup tables help you:
Query data that isn't present in your New Relic account
You can add and manage lookup tables through the UI or the NRQL Lookups API.
Some tips when adding a table:
The table name is what you'll use to reference that table when you write a NRQL query.
Table data isn't obfuscated, so avoid uploading sensitive information.
It can take several minutes for an added or updated table to be available in a NRQL query.
When you delete a table, that data is no longer available in NRQL queries, so you should try to make sure a deleted table's data isn't being used in important dashboards.
The UI for uploading lookup tables is located in the logs UI, but you can use your lookup table data when querying any data type, not just logs.
To find the lookup table UI: From one.newrelic.com, click Logs, and then click Lookup tables. From there, you can upload, download, update, and delete tables.
Using the NRQL Lookups API
Alternatively, you can add and manage tables using the NRQL Lookups API. The NRQL Lookups API supports uploading lookup tables as a CSV file and a JSON object.
CSV value parsing
When a value is read from a CSV file, the system will attempt to parse the value to a boolean, number, or string value.
Rule
CSV value
Interpreted value
Interpreted type
Value Types
String: This is the default type for any value, unless criteria are met to interpret it as a number or boolean.
Boolean: If the value is equal to true or false, case-insensitive, the value is parsed as a boolean.
Numbers: Value parsing can interpret integer and float values, with the following stipulations:
Scientific notation is supported. Values including scientific notation are parsed to a float value.
If the numeric value contains a decimal or the letter E, it will parse to a float value. Otherwise, it will parse to an integer value.
Maximum integer supported: 9223372036854775807 (Note, numbers higher than 9007199254740991 may lose precision when viewed in a web browser)
Minimum integer supported: -9223372036854775808 (Note, numbers lower than -9007199254740991 may lose precision when viewed in a web browser)
When interpreting a float value, the integer part of the value (the part before the decimal in the original string value) must lie within the maximum/minimum supported integer bounds.
If the value contains a decimal, there must be at least one numeric digit before and after the decimal.
Signed values:
Values that start with a numeric digit or a plus "+" sign are considered positive numbers.
Values that start with a minus "-" sign or are surrounded in parentheses are considered negative numbers.
Original values are never trimmed. Whitespace at the beginning or end of a value will cause it to be parsed as a string.
abc a b c 123 1.23 1.23E-3 true abc 123 true
abc a b c 123 1.23 1.23E-3 true abc 123 true
string
string
number
number
number
boolean
string
string
string
Double quotes
Any value can be wrapped in double quotes. Double quotes are required if the value contains a comma or starts with a double quote.
Within a double-quoted value, two double quotes in a row will parse to a single double quote in the resulting value.
Wrapping a value in double quotes does not force it to be interpreted as a string. Parsing of the value still occurs.
"abc" "a,b,c" "a b c" """abc""" "a,""b"",c" "a ""b"" c" """123""" """true""" "123" "true"
abc a,b,c a b c "abc" "a,"b",c" a "b" c "123" "true" 123 true
string
string
string
string
string
string
string
string
number
boolean
Forced strings
To force a value to be interpreted as a string, prefix the value with a single quote.
If the value is double-quoted, the single quote needs to be after the opening double quote.
If the string value needs to start with a single quote, you'll need two single quotes, because the first one forces the value to be interpreted as a string.