Hello, Can field transformations be composed? I.e:...
# general
p
Hello, Can field transformations be composed? I.e:
"fromDateTime(JSONPATHSTRING(result,'$.AudioLength','00:00:00.000'), 'HH:mm:ss.SSS')"
where the transformed field is of type
Long
?
n
yes, nesting should be supported
1
p
Hello Neha, I'm trying something like:
"transformFunction": "fromDateTime(Groovy({(result =~ /([aA]udio[lL]ength[^0-9.]*)([0-9:.]*)/)[0][2]}, result), 'HH:mm:ss.SSSSSSS')"
This is retrieving a field from a json string (which may have similar but distinct keys (audioLength or AudioLength) and then parsing that string into milliseconds since epoch. I am unable to define this transformation in the UI, getting the following message:
No information related to this in the logs of pinot.
Just defining:
Copy code
"transformFunction": "Groovy({(result =~ /([aA]udio[lL]ength[^0-9.]*)([0-9:.]*)/)[0][2]}, result)"
Seems to work though.