You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently data ingested from mongodb cdc is parsed as the JSONB type. See example here.
Recently we saw user requesting supporting strongly typed schema for data ingested by mongodb cdc, which leads to supporting defining strongly typed STRUCT in CREATE TABLE statement for mongodb cdc. Exmaple:
We already support parsing jsonb to struct via josnb_populate_record so we can borrow the implementation here as well. The expected behavior is:
If the fields of a document ingested from mongodb is exactly the same as the defined struct, the document will be parsed and ingested successfully.
If the fields of a document ingested from mongodb is a superset of the defined struct, the document will be parsed and ingested successfully by ignoring the extra fields.
If the fields of a document ingested from mongodb is a subset of the defined struct, the document will be parsed and ingested successfully by filling in NULL for the missing fields.
If the payload a given field in the document ingested from mongodb cannot be converted to the type defined in the struct (e.g. cannot cast text to int), the whole document will be skipped by filling in NULL for the struct.
The text was updated successfully, but these errors were encountered:
The conversion rule may be different from jsonb_populate_record. Or in other words, AVOID updating jsonb_populate_record behavior to be closer to their usage in MongoDB. The function is supposed to be PostgreSQL compatible.
Currently data ingested from mongodb cdc is parsed as the
JSONB
type. See example here.Recently we saw user requesting supporting strongly typed schema for data ingested by mongodb cdc, which leads to supporting defining strongly typed
STRUCT
inCREATE TABLE
statement for mongodb cdc. Exmaple:We already support parsing jsonb to struct via josnb_populate_record so we can borrow the implementation here as well. The expected behavior is:
The text was updated successfully, but these errors were encountered: