Hello
This query leads to the error below; in other words, is it possible to import any json to a table created as “create table msg (o object);” ?
INSERT INTO msg VALUES ('{"entry":[{"changes":[{"field":"messages","value":{"contacts":[{"profile":{"name":"Name Surname"},"wa_id":"20000000301"}],"messages":[{"from":"20000000301","id":"wamid.da0dcd656790480cb19bb8d20a31401b","referral":{"ctwa_clid":"23a2d720084042bfaa2b3d927c3caf4d","source_id":"120000000000000000","source_url":"https:\/\/fb.me\/ABC"},"text":{"body":"Hello, I want to buy flowers with a 10% discount."},"timestamp":"1724779122","type":"text"}],"messaging_product":"whatsapp","metadata":{"display_phone_number":"10000000301","phone_number_id":"100000000000000"}}}],"id":"100000000000000"}]}'::object)
crate.client.exceptions.ProgrammingError: SQLParseException[Cannot cast object element `entry` with value `[{changes=[{field=messages, value={metadata={phone_number_id=100000000000000, display_phone_number=10000000301}, messaging_product=whatsapp, messages=[{referral={source_id=120000000000000000, ctwa_clid=23a2d720084042bfaa2b3d927c3caf4d, source_url=https://fb.me/ABC}, from=20000000301, id=wamid.da0dcd656790480cb19bb8d20a31401b, text={body=Hello, I want to buy flowers with a 10% discount.}, type=text, timestamp=1724779122}], contacts=[{profile={name=Name Surname}, wa_id=20000000301}]}}], id=100000000000000}]` to type `object_array`]```