• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Enhanced string parsing for better, more efficient NRQL queries

October 14, 2022

Efficiently explore complex data with new NRQL variables, aparse(), if(), and more

  • Get started

NRQL productivity improvements makes querying faster with anchor parse, regex multi-capture, and more.

Making sense of complex data like log messages just got easier! With NRQL variables, the new aparse() and if() functions, you can obtain useful information from your data more efficiently and gain insights faster.

With NRQL variables, you can assign values to variables and use them multiple times in your query. The if() function lets you select one of two results based on a condition that's either true or false. In addition, we've enhanced our existing regex capture() function to allow multiple capture groups, for simpler queries with better performance!

In this example, we extract an item ID, and unit price from a log message, and additionally show which pricing tier the item falls into: "NRQL with capture"

The aparse() function is a simpler, faster alternative to capture() for use when you don't require the full power of regular expressions. With aparse(), use "anchor" text and the '*' wildcard to capture the fields you need: "NRQL with aparse"

Check out this demo NerdByte video on the new NRQL query components

Next steps

  1. Review the docs for NRQL variables, aparse() and if() and start writing your own queries!
  2. Read our blog post for more tips and examples.
  3. Share your feedback, post your own queries, and see even more examples on our Explorer's Hub: Anchor parse and NRQL variables, Regex Multi-capture, and if().
Copyright © 2024 New Relic Inc.

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