Hi team, I have a question and don’t know how to s...
# general
a
Hi team, I have a question and don’t know how to solve it. How can I extract numOfStas.Policy in Kafka message and save it to a Pinot table field? When I use transformFunction, it doesn’t work. { “columnName”: “stas_policy”, “transformFunction”: “jsonPathString(stats, ‘$.text_body.fields.numOfStas.Policy’)” } And a sample Kafka message is like this: { “name”: “telemetry_signal_gfw_api_usage”, “stats”: { “text_body”: { “fields”: { “numOfStas”: 0, “numOfStas.Policy”: 21 } } } }
m
I think the tricky thing is that
text_body
is an array
a
Hi, thanks, I’m trying on https://jsonpath.herokuapp.com/. And I think I just found how to extract it. $.text_body.fields[“numOfStas.Policy”] will work.
m
oh got it
a
It did work.
m
that makes sense - I guess the way it was before it didn't realise that the
.
was part of the property name
good times!
a
🎉