QUERY_STRING_TO_RECORD

Extracts data from query string

Syntax

QUERY_STRING_TO_RECORD(mappings, value)

Arguments

NameTypeDescriptionDefault Value

mappings

string

Field names

value

string

Examples

mappingsvalueOutput

'a,string'

'a=Hello'

{a: Hello}

'a,string

b,string'

'a=Hello&b=World'

{a: Hello, b: World}

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 mappings, value,
        QUERY_STRING_TO_RECORD('a,string', value) AS Output
    FROM default_glue_catalog.upsolver_samples.orders_raw_data
    LET mappings = 'a,string',
        value = 'a=Hello'
    WHERE time_filter()
    LIMIT 1;

Query result

mappingsvalueOutput

'a,string'

'a=Hello'

{a: Hello}

Last updated