Home > Software engineering >  Json data insert into table in snowflake
Json data insert into table in snowflake

Time:04-12

1 [["id=13456,state=closed]"]

2 [["id=34566,state=closed]",["id=34567,state=open]" ]

create table Staff_status (id int, status ? ) what should be the data type for status and want output in json format, How can I achieve it?

CodePudding user response:

You need to use the PARSE_JSON function

CodePudding user response:

The type of the column is variant thus

create table student_color (id int, name string, color_code variant);

Nick’s point is valid to get your json looking text/string into a variant you need to use PARSE_JSON.

  • Related