HEX_TO_DECIMAL

Converts a hexadecimal string value to the corresponding signed 64-bit integer.

Syntax

HEX_TO_DECIMAL(value)

Arguments

NameTypeDescriptionDefault Value

value

string

The hexadecimal string value to convert

Returns

Returns a bigint value.


Examples

valueOutput

'###'

null

'ff'

255

'0xff'

255

Transformation job example

SQL

CREATE JOB function_operator_example
    ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data 
  MAP_COLUMNS_BY_NAME
    SELECT value,
        HEX_TO_DECIMAL(value) AS Output
    FROM default_glue_catalog.upsolver_samples.orders_raw_data
    LET value = '###'
    WHERE $commit_time BETWEEN run_start_time() AND run_end_time()
    LIMIT 1;

Query result

valueOutput

'###'

null

Last updated