Hi Team, I am currently working on adding a new ta...
# troubleshooting
s
Hi Team, I am currently working on adding a new table to Apache Pinot to support a use case where I need to transform a column’s value dynamically during ingestion. Specifically, I want to set the startTime column to NULL if the incoming value is an empty string; otherwise, I would like to retain the incoming value as is. While configuring this, I encountered the following error:
Invalid table config: Arguments of a transform function '[startTime, startTime]' cannot contain the destination column 'startTime'
I understand that this error occurs because the transform function cannot directly reference the destination column. However, I want to avoid creating a separate column with a different name for this transformation. Could you please advise if there is an alternative approach or best practice to handle this use case within Pinot?
s
As per my experience, you cannot update the value of column using the raw value of the column. One way to solve is to add a new field in schema (e.g. startTimeV2) and have transform config like : "columnName" : "startTimeV2" "transformFunction" : "<<Insert logic using startTime>>"
m
Also, note that Time is a special column in Pinot, you definitely don't want to set it to NULL.