Dynamic JSON can be easily loaded into Snowflake as is. In your example, with variable length arrays, you can use FLATTEN() to explode the single row of JSON into multiple rows in a query. In this scenario I would suggest you leave it as JSON in your data lake too.
The penalty for such things is relatively low since the JSON data isn't just stored as a long string; instead internally Snowflake analyzes the JSON as its loaded and does things to aid speedy queries, like creating virtual columns for frequent paths like $.Job_Profile_Reference and $.Job_Profile_Reference.ID in your example.
with semistructured as (select parse_json('{"Job_Profile_Reference": {"ID": [{"@type": "WI","__text": "4acf03b2e8e301fab3caeab105020f"},{"@type": "Job_Profile_ID","__text": "112"}]}}') json)
select * from semistructured, lateral flatten(json, recursive=>True) structured;
JSON SEQ KEY PATH INDEX VALUE THIS
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 Job_Profile_Reference Job_Profile_Reference { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } { "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } }
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 ID Job_Profile_Reference.ID [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] }
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 Job_Profile_Reference.ID[0] 0 { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" } [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ]
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 @type Job_Profile_Reference.ID[0]['@type'] "WI" { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 __text Job_Profile_Reference.ID[0].__text "4acf03b2e8e301fab3caeab105020f" { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 Job_Profile_Reference.ID[1] 1 { "@type": "Job_Profile_ID", "__text": "112" } [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ]
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 @type Job_Profile_Reference.ID[1]['@type'] "Job_Profile_ID" { "@type": "Job_Profile_ID", "__text": "112" }
{ "Job_Profile_Reference": { "ID": [ { "@type": "WI", "__text": "4acf03b2e8e301fab3caeab105020f" }, { "@type": "Job_Profile_ID", "__text": "112" } ] } } 1 __text Job_Profile_Reference.ID[1].__text "112" { "@type": "Job_Profile_ID", "__text": "112" }```
jq, and they'll help you transform a json. - Felipe Hoffa