Created
February 7, 2014 22:38
-
-
Save jeromebanks/8873467 to your computer and use it in GitHub Desktop.
to_json converting from snake_case to CamelCase
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 | |
to_json( | |
named_struct("camel_case", 1, | |
"big_double", 9999.99, | |
"the_really_cool_value", "a string val", | |
"another_array", array( 4,5,6), | |
"random_map", map("a",2.3,"b",5.6) ), true) | |
from mytable; | |
Output: | |
{"camelCase":1,"bigDouble":9999.99,"theReallyCoolValue":"a string val","anotherArray":[4,5,6],"randomMap":{"b":5.6,"a":2.3}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment