Hi, is there a way to convert a string to a long v...
# troubleshooting
a
Hi, is there a way to convert a string to a long via the ingestion transformation config? I was hoping that I'd be able to do something like the following but I keep running into an error:
Copy code
"ingestionConfig": {
      "transformConfigs": [{
        "columnName": "timestamp_start_int",
        "transformFunction": "cast(\"timestamp_start\", \"LONG\")"
      }]
    },
m
Is the string in date time format? If so, there’s UDF’s to do so.
a
Yeah unfortunately it's in unix timestamp but it's typed as a string. Examples:
Copy code
"1659987967486"
"1659987967830"
"1659987967641"
I think I may be able to use Groovy but want to avoid that because of security reasons
s
If I am not wrong, If it is a long value in string format, defining your schema with that column data type as long should automatically convert it into long.
1
a
@Sukesh Boggavarapu You are right.. thanks!