I am trying to upload the realtime table schema wi...
# troubleshooting
w
I am trying to upload the realtime table schema with the following dateTimeFieldSpecs
Copy code
"dateTimeFieldSpecs": [
    {
      "name": "timestamp",
      "dataType": "LONG",
      "defaultNullValue": 0,
      "format": "1:MILLISECONDS:EPOCH",
      "granularity": "1:MILLISECONDS"
    },
    {
      "name": "timestamp_seconds",
      "dataType": "LONG",
      "defaultNullValue": 0,
      "transformFunction": "toEpochSecondsRounded(timestamp, 1)",
      "format": "1:SECONDS:EPOCH",
      "granularity": "1:SECONDS"
    }
  ]
I got the following error:
Copy code
{
  "code": 400,
  "error": "Cannot add invalid schema: schema_name. Reason: Exception in getting arguments for transform function 'toEpochSecondsRounded(timestamp, 1)' for column 'timestamp_seconds'"
}
What is the wrong?
It seems that timestamp is reserved word. Should not be used here.
m
if you put it in double quotes it should work
Copy code
"transformFunction": "toEpochSecondsRounded(\"timestamp\", 1)",
w
Thanks @Mark Needham