Skip to content

Instantly share code, notes, and snippets.

@cdecl
Last active August 23, 2022 23:50
Show Gist options
  • Save cdecl/dd7108401a044d1b976e3a42e1e68c99 to your computer and use it in GitHub Desktop.
Save cdecl/dd7108401a044d1b976e3a42e1e68c99 to your computer and use it in GitHub Desktop.
presto-table
create table hive.default.sample (
id varchar,
name varchar,
etc1 array(row(key1 varchar, key2 varchar)),
etc2 array(varchar)
)
with (
format = 'json',
external_location = 's3a://data/sample/'
)
select *
from hive.default.sample;
{"id":1,"name":"Alice"}
{"id":2,"name":"Bob"}
{"id":3,"name":"Carol"}
{"id":4,"name":"code44", "etc1": [{"key1": "val1"}, {"key2": "test"}] }
{"id":5,"name":"code55", "etc2": ["test", "test1", "test3"]}
{"id":6,"name":"code66"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment