Created
November 21, 2022 13:41
-
-
Save megaherz/18cb7775c8d2e79ab5e2e82bdcee75bb to your computer and use it in GitHub Desktop.
Debesium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres=# insert into customers (id, first_name, last_name, email) values (1005, 'foo', 'bar', 'foo@bar.com'); | |
INSERT 0 1 | |
postgres=# update customers set first_name = 'egg' where id = 1005; | |
UPDATE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema":{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"int32", | |
"optional":false, | |
"field":"id" | |
} | |
], | |
"optional":false, | |
"name":"data.cdc.dbname.Key" | |
}, | |
"payload":{ | |
"id":1005 | |
} | |
}{ | |
"schema":{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"int32", | |
"optional":false, | |
"field":"id" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"first_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"last_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"email" | |
} | |
], | |
"optional":true, | |
"name":"data.cdc.dbname.Value", | |
"field":"before" | |
}, | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"int32", | |
"optional":false, | |
"field":"id" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"first_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"last_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"email" | |
} | |
], | |
"optional":true, | |
"name":"data.cdc.dbname.Value", | |
"field":"after" | |
}, | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"version" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"connector" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"name" | |
}, | |
{ | |
"type":"int64", | |
"optional":false, | |
"field":"ts_ms" | |
}, | |
{ | |
"type":"string", | |
"optional":true, | |
"name":"io.debezium.data.Enum", | |
"version":1, | |
"parameters":{ | |
"allowed":"true,last,false" | |
}, | |
"default":"false", | |
"field":"snapshot" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"db" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"schema" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"table" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"txId" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"lsn" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"xmin" | |
} | |
], | |
"optional":false, | |
"name":"io.debezium.connector.postgresql.Source", | |
"field":"source" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"op" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"ts_ms" | |
}, | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"id" | |
}, | |
{ | |
"type":"int64", | |
"optional":false, | |
"field":"total_order" | |
}, | |
{ | |
"type":"int64", | |
"optional":false, | |
"field":"data_collection_order" | |
} | |
], | |
"optional":true, | |
"field":"transaction" | |
} | |
], | |
"optional":false, | |
"name":"data.cdc.dbname.Envelope" | |
}, | |
"payload":{ | |
"before":null, | |
"after":{ | |
"id":1005, | |
"first_name":"foo", | |
"last_name":"bar", | |
"email":"foo@bar.com" | |
}, | |
"source":{ | |
"version":"1.2.3.Final", | |
"connector":"postgresql", | |
"name":"dbserver1", | |
"ts_ms":1600374991648, | |
"snapshot":"false", | |
"db":"postgres", | |
"schema":"public", | |
"table":"customers", | |
"txId":602, | |
"lsn":34088472, | |
"xmin":null | |
}, | |
"op":"c", | |
"ts_ms":1600374991762, | |
"transaction":null | |
} | |
}{ | |
"schema":{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"int32", | |
"optional":false, | |
"field":"id" | |
} | |
], | |
"optional":false, | |
"name":"data.cdc.dbname.Key" | |
}, | |
"payload":{ | |
"id":1005 | |
} | |
}{ | |
"schema":{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"int32", | |
"optional":false, | |
"field":"id" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"first_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"last_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"email" | |
} | |
], | |
"optional":true, | |
"name":"data.cdc.dbname.Value", | |
"field":"before" | |
}, | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"int32", | |
"optional":false, | |
"field":"id" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"first_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"last_name" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"email" | |
} | |
], | |
"optional":true, | |
"name":"data.cdc.dbname.Value", | |
"field":"after" | |
}, | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"version" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"connector" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"name" | |
}, | |
{ | |
"type":"int64", | |
"optional":false, | |
"field":"ts_ms" | |
}, | |
{ | |
"type":"string", | |
"optional":true, | |
"name":"io.debezium.data.Enum", | |
"version":1, | |
"parameters":{ | |
"allowed":"true,last,false" | |
}, | |
"default":"false", | |
"field":"snapshot" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"db" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"schema" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"table" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"txId" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"lsn" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"xmin" | |
} | |
], | |
"optional":false, | |
"name":"io.debezium.connector.postgresql.Source", | |
"field":"source" | |
}, | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"op" | |
}, | |
{ | |
"type":"int64", | |
"optional":true, | |
"field":"ts_ms" | |
}, | |
{ | |
"type":"struct", | |
"fields":[ | |
{ | |
"type":"string", | |
"optional":false, | |
"field":"id" | |
}, | |
{ | |
"type":"int64", | |
"optional":false, | |
"field":"total_order" | |
}, | |
{ | |
"type":"int64", | |
"optional":false, | |
"field":"data_collection_order" | |
} | |
], | |
"optional":true, | |
"field":"transaction" | |
} | |
], | |
"optional":false, | |
"name":"data.cdc.dbname.Envelope" | |
}, | |
"payload":{ | |
"before":{ | |
"id":1005, | |
"first_name":"foo", | |
"last_name":"bar", | |
"email":"foo@bar.com" | |
}, | |
"after":{ | |
"id":1005, | |
"first_name":"egg", | |
"last_name":"bar", | |
"email":"foo@bar.com" | |
}, | |
"source":{ | |
"version":"1.2.3.Final", | |
"connector":"postgresql", | |
"name":"dbserver1", | |
"ts_ms":1600375609365, | |
"snapshot":"false", | |
"db":"postgres", | |
"schema":"public", | |
"table":"customers", | |
"txId":603, | |
"lsn":34089688, | |
"xmin":null | |
}, | |
"op":"u", | |
"ts_ms":1600375609778, | |
"transaction":null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment