turns out PG does require the final schema, but of course they don’t do a stringified JSON format. It looks like this in PG land:
select * from json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b text);but unfortunately Duck json_transform (which is very similar) wants a structure with different formatting like this:
SELECT json_transform(j, '{"family": "TINYINT", "coolness": "DECIMAL(4, 2)"}') FROM example;it would be great if json_transform took a struct type or whatever it is called in Duck instead of a stringified schema.