Hi there!
By default object column policy is DYNAMIC. However I need to insert objects with IGNORED column policy into a table with column_policy = ‘dynamic’ so it won’t change the schema and index all object’s fields.
Let’s say I have a table:
CREATE TABLE event (id BIGINT)
WITH (column_policy = 'dynamic')
And I want to insert an event like:
INSERT INTO event (id, ts, obj)
VALUES (1, 1667842489642, '{"prop": "value"}'::OBJECT(IGNORED))
It works great when I use plain SQL. But I didn’t find a way to do it using HTTP endpoint with parameter substitution (for bulk inserts). I am only able to insert it like this:
{
"stmt": "INSERT INTO event (id, ts, obj) values(?, ?, ?)",
"bulk_args": [
[1, 1667842489642, {"prop": "value"}]
]
}
But it insets obj column as DYNAMIC object and indexes it.
Is there any way to specify object policy using parameter substitution over HTTP endpoint?
Is there any way to change default column policy of the object?