Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
converting json to athena data type
WITH dataset AS (
SELECT
CAST(JSON '"HELLO ATHENA"' AS VARCHAR) AS hello_msg,
CAST(JSON '12345' AS INTEGER) AS some_int,
CAST(JSON '{"a":1,"b":2}' AS MAP(VARCHAR, INTEGER)) AS some_map
)
SELECT * FROM dataset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment