Created
February 7, 2014 00:37
-
-
Save jeromebanks/8855408 to your computer and use it in GitHub Desktop.
from_json using named_struct
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
select | |
from_json(' { "key1":"string value", "key2":2.1, "key3":560000 }', | |
named_struct("key1", "", "key2", cast(0.0 as double), "key3", cast(1 as bigint) ) ) | |
from mytable; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment