CREATE TABLE capes
(
`id` String,
`title` Array(String),
`year` UInt16,
`documentType` String,
`abstract` Array(String),
`subjects` Array(String),
`sourceName` Array(String),
`graduateProgram` Array(String),
`graduateProgramId` Array(String),
`capesResearchGreatArea` Array(String),
`lang` String,
`lattesId` String,
`cnpqArea` Array(String)
)
ENGINE = MergeTree
ORDER BY (title, year, lang);
SELECT * FROM
INFILE 'http://127.0.0.1:9000/capes/dataset/00000424c18cc9376ddd5a9916e77487.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=7PX21H2IK7SMRK44ZRZF%2F20230131%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230131T193751Z&X-Amz-Expires=604800&X-Amz-Security-Token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiI3UFgyMUgySUs3U01SSzQ0WlJaRiIsImV4cCI6MTY3NTIzNjcyNywicGFyZW50Ijoicm9vdCJ9.JRbiZGLZgtdMTnJlFJY4Cn1nscq6z2n4aWwRkeqDKxKMTGY38T9gQTTjKdVfvFFFzkRNK5zNF4Trz3kbjPcS7g&X-Amz-SignedHeaders=host&versionId=null&X-Amz-Signature=b5c09c4e2525f79ea01edb28a74823784b3b7525dbe211ace749f756b895a3bd'
FORMAT JSONEachRow;
SET allow_experimental_object_type = 1; #JSONAsObject
INSERT INTO json_test.capes SELECT *
FROM s3('http://127.0.0.1:9000/capes/dataset/00000424c18cc9376ddd5a9916e77487.json', 'JSONAsObject')
LIMIT 1;