Function | Description |
---|---|
BINARY_STRING([string] giventext) | Converts giventext to binary. |
CAST([any type] value AS < type>) | Converts value to a type specified by < type>. |
CONVERT_FROM(expression, [literal string] conv_type) | Converts the byte data in expression to the type specified in conv_type. The expression can be a literal string or a field name. Note that if you try to run CONVERT_FROM(, ‘JSON’) in an inner query, the query fails during planning time because Dremio doesn’t know the schema of the json field. |
CONVERT_FROM(expression, ‘UTF8’, [character] replacement char) | Converts the byte data in expression to UTF-8. Expression can be a literal string or a field name. Will replace any invalid UTF-8 characters with the replacement character. |
CONVERT_TO(expression, [literal string] conv_type) | Converts expression to bytes, depending on the type specified in conv_type. expression can be a literal value (string, number, etc.) or a field name. |
IS_UTF8(expression) | Returns true if expressions is valid UTF-8, otherwise returns false . |
STRING_BINARY([binary] data) | Returns the bytes in data as a string. Unprintable bytes are given in hexadecimal with a preceding ‘\x’. |
TO_CHAR(expression, [literal string] format) | Converts expression to a string using the format specified in format. expression can be a literal value (string, number, etc.) or a field name. |
TO_DATE([number] epochsec) | Converts epochsec, the Unix time given in seconds, to a date. |
TO_DATE([string] giventext, [literal string] format) | Converts giventext to a date using the format given in format. |
TO_NUMBER([string] giventext, [literal string] format) | Parses the string giventext into a number according to the format indicated in format. |
TO_TIME([number] ms) | Converts ms, the number of milliseconds since midnight, to a time. |
TO_TIME([string] giventext, [literal string] format) | Converts giventext to a time using the format given in format. |
TO_TIMESTAMP([number] epochsec) | Converts the Unix time epochsec to a timestamp (date & time). |
TO_TIMESTAMP([string] giventext, [literal string] format) | Converts giventext to a timestamp (date & time) using the format given in format. |
TYPEOF([field name] givenfield) | Returns the type(s) of values in givenfield. |