Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save den-crane/32e0d79459cd0a944f45f89073f8de11 to your computer and use it in GitHub Desktop.
Save den-crane/32e0d79459cd0a944f45f89073f8de11 to your computer and use it in GitHub Desktop.
json inference.sql
create table t Engine=Memory empty as select * from format('JSONEachRow', '{
"ID": "<id>",
"FrameUri": "<uri>",
"Detections": [
{
"CategoryId": 1,
"ID": "<id>",
"SegmentationPoints": [
{
"X": 1,
"Y": 1
}
]
}
]
}') settings schema_inference_make_columns_nullable = 0, describe_compact_output=1;
CREATE TABLE default.t
(
`ID` String,
`FrameUri` String,
`Detections` Array(Tuple(CategoryId Int64, ID String, SegmentationPoints Array(Tuple(X Int64, Y Int64))))
)
ENGINE = Memory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment