description |
---|
Converts a value to a binary string of a supported data type. |
- expression: The value to convert to a binary string.
- data_type: The data type to use for the conversion to a binary string.
Examples
{% code title="CONVERT_TO example" %}
SELECT CONVERT_TO('this value' ,'UTF8')
-- dGhpcyB2YWx1ZQ==
{% endcode %}
You can convert values to binary strings of these data types:
- BIGINT_BE
- BIGINT_HADOOPV
- BIGINT
- BOOLEAN_BYTE
- DATE_EPOCH_BE
- DATE_EPOCH
- DOUBLE_BE
- DOUBLE
- EXTENDEDJSON
- FLOAT_BE
- FLOAT
- INT_BE
- INT_HADOOPV
- INT
- JSON
- SIMPLEJSON
- TIME_EPOCH_BE
- TIME_EPOCH
- TIMESTAMP_EPOCH_BE
- TIMESTAMP_EPOCH
- UTF8
\