Why does format version 2 change the style of column/values from two arrays to maps in json output? #285
Unanswered
garyokane-es
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have been using the wal2json plugin in v1 mode for some time and am planning to shift to v2 due to larger transactions. I saw a change in the JSON format, which has columns and values in a single map, compared to v1, which has columns and headers as separate arrays. Is this expected, or is there a parameter that makes v2 match v1 for columns/value
V1 Sample payload
{ "change": [ { "kind": "update", "schema": "tableA", "table": "tableA", "columnnames": [ "col1", "col2", "col3" ], "columnvalues": [ 1, 2, 3 ], "pk": { "pknames": [ "id" ], "pktypes": [] }, "oldkeys": { "keynames": [ "id" ], "keyvalues": [ "" ] } } ] }
V2 Sample
{ "action": "U", "schema": "tableA", "table": "tableA", "columns": [ { "name": "col1", "value": "1" }, { "name": "col2", "value": 2 }, { "name": "col3", "value": 3 } ], "identity": [ { "name": "id", "value": "1" } ], "pk": [ { "name": "id" } ] }
Also is there a list of Actions and what the letters stand for?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions