Created
June 11, 2020 07:57
-
-
Save velotiotech/1a277436c55153132389b6844095f51c to your computer and use it in GitHub Desktop.
extracting properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH dataset AS ( | |
SELECT '{"name": "Susan Smith", | |
"org": "engineering", | |
"projects": [{"name":"project1", "completed":false}, | |
{"name":"project2", "completed":true}]}' | |
AS blob | |
) | |
SELECT | |
json_extract(blob, '$.name') AS name, | |
json_extract(blob, '$.projects') AS projects | |
FROM dataset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment