Ant-DAO-MentJSON Manipulation
Updated 2025-03-11
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
›
⌄
with
raw_data as (
select
'{
"field1":"text",
"field2":100,
"field3":1.05,
"field4":"0x020",
}' as json_raw_string
),
parsed_data as (
select
try_parse_json(json_raw_string)::variant as my_json_object
from
raw_data
)
select
my_json_object:field1::text as field1,
try_to_numeric(my_json_object:field2::text)::integer as field2,
TRY_TO_DOUBLE(my_json_object:field3::text)::double as field3,
ethereum.public.udf_hex_to_int (my_json_object:field4)::integer as field4
from
parsed_data
QueryRunArchived: QueryRun has been archived