Do I have to flatten JSON in Druid 24?

If you’ve been using Druid for awhile, you’ve probably seen flattenSpec:

"flattenSpec": {
  "useFieldDiscovery": true,
  "fields": [
    { "name": "baz", "type": "root" },
    { "name": "foo_bar", "type": "path", "expr": "$.foo.bar" },
    { "name": "first_food", "type": "jq", "expr": ".thing.food[1]" }
  ]
}

With Druid 24, you can now PARSE_JSON(expr):

Parses expr into a COMPLEX<json> object. This operator deserializes JSON values when processing them, translating stringified JSON into a nested structure. If the input is not a VARCHAR or it is invalid JSON, this function will result in an error.

Which means that you no longer have to flatten JSON. Here’s the relevant doc, and here’s an example and accompanying discussion from the community.

This is SO COOL as a new feature. Can’t wait for @Sergio_Ferragut 's upcoming videos!