splitting json in a column into multiple columns in snowflake


This Content is from Stack Overflow. Question asked by Uzair Akbar

Actually need help in splitting the below mentioned JSON into a table(also given below). Kindly tell what would be the SQL for splitting this JSON into multiple columns? Thanks

{“{“Locale”: “England”, “CourseId”: “882d3d41-ab18-a87d-0b10-7d2ee0af95cf”, “Currency”: “GBP”, “FeeState”: “Provisional”, “CourseFees”: “9250”, “AcademicYear”: “2023”, “CourseOptionId”: “8391ff2c-8a16-4b5b-a1f4-2352fcf79b96”, “FeeDurationPeriod”: “Year 1″}”,”{“Locale”: “Northern Ireland”, “CourseId”: “882d3d41-ab18-a87d-0b10-7d2ee0af95cf”, “Currency”: “GBP”, “FeeState”: “Provisional”, “CourseFees”: “9250”, “AcademicYear”: “2023”, “CourseOptionId”: “8391ff2c-8a16-4b5b-a1f4-2352fcf79b96”, “FeeDurationPeriod”: “Year 1″}”

enter image description here


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?