Hi, I use jsonPathLong to extract timestamp and it...
# troubleshooting
a
Hi, I use jsonPathLong to extract timestamp and it’s ok. { “columnName”: “timestamp”, “transformFunction”: “jsonPathLong(body, ‘$.timestamp’)” } Then I want to update the table config and add this transformation function. { “columnName”: “hoursSinceEpoch”, “transformFunction”: “toEpochHours(timestamp)” } But returned the following error. I had add this column in table schema.
Pinot version is 0.10 and I referred to this doc to configure my table. https://docs.pinot.apache.org/developers/advanced/ingestion-level-transformations#datetime-functions
l
I'm pretty sure the column you're requesting needs to be present in the data you're transforming. You can't depend on a column dynamically created through a transform function for another transform function
So you could potentially run your transform function like this
Copy code
{
  "columnName": "hoursSinceEpoch",
  "transformFunction": "toEpochHours(jsonPathLong(body, '$.timestamp'))"
}
I haven't tested this myself, but in theory that should work
1
a
Yes, I’ve tried your method and it worked. Thank you so much.
l
Perfect, glad to hear it!