Hi All do we have some example to extract attribut...
# general
c
Hi All do we have some example to extract attributes from json objects in transformFunction
n
you would typically use jsonFormat or jsonPath functions. https://docs.pinot.apache.org/users/user-guide-query/supported-transformations#json-functions Here’s a video showing a demo of this:

https://youtu.be/L5b_OJVOJKo?t=2070

c
Hi @User Thx for your replay, If json path is null, will pinot throw exception or just give null instead thx
n
if your whole jsonField (e.g. person) is null, you’ll get an exception. But if just the jsonPath (person.address.state) is null, you will get null, or default value that you set
Copy code
JSONPATHSTRING(person, '$.address.state', 'CA')
are you seeing different behavior?
c
Got it, thx @User