Conversion
This page describes how to use conversion or CAST functions in Lenses SQL Processors.
CAST
CAST (dt AS int)
Enables conversion of values from one data type to another.
Available in:
Processors
SQL Studio
✓
✓
Sample code
USE `kafka`;
SELECT
CAST(price as INT),
price
FROM products-events
LIMIT 1;
Output:
{
"value": {
"alias": 2, # new value
"price": 2.46 # old value
}
}
Last updated
Was this helpful?