DBZ-5098 Update field "ts_ms" to connector docs
This commit is contained in:
parent
52ba58ccc3
commit
327f9ce6d4
@ -263,7 +263,7 @@ The message contains a logical representation of the table schema.
|
||||
"version": "{debezium-version}",
|
||||
"connector": "db2",
|
||||
"name": "db2",
|
||||
"ts_ms": 1588252618953,
|
||||
"ts_ms": 0,
|
||||
"snapshot": "true",
|
||||
"db": "testdb",
|
||||
"schema": "DB2INST1",
|
||||
@ -272,19 +272,20 @@ The message contains a logical representation of the table schema.
|
||||
"commit_lsn": "00000025:00000d98:00a2",
|
||||
"event_serial_no": null
|
||||
},
|
||||
"databaseName": "TESTDB", // <1>
|
||||
"ts_ms": 1588252618953, // <1>
|
||||
"databaseName": "TESTDB", // <2>
|
||||
"schemaName": "DB2INST1",
|
||||
"ddl": null, // <2>
|
||||
"tableChanges": [ // <3>
|
||||
"ddl": null, // <3>
|
||||
"tableChanges": [ // <4>
|
||||
{
|
||||
"type": "CREATE", // <4>
|
||||
"id": "\"DB2INST1\".\"CUSTOMERS\"", // <5>
|
||||
"table": { // <6>
|
||||
"type": "CREATE", // <5>
|
||||
"id": "\"DB2INST1\".\"CUSTOMERS\"", // <6>
|
||||
"table": { // <7>
|
||||
"defaultCharsetName": null,
|
||||
"primaryKeyColumnNames": [ // <7>
|
||||
"primaryKeyColumnNames": [ // <8>
|
||||
"ID"
|
||||
],
|
||||
"columns": [ // <8>
|
||||
"columns": [ // <9>
|
||||
{
|
||||
"name": "ID",
|
||||
"jdbcType": 4,
|
||||
@ -355,21 +356,27 @@ The message contains a logical representation of the table schema.
|
||||
|Item |Field name |Description
|
||||
|
||||
|1
|
||||
|`ts_ms`
|
||||
|Optional field that displays the time at which the connector processed the event. The time is based on the system clock in the JVM running the Kafka Connect task.
|
||||
|
||||
In the source object, ts_ms indicates the time that the change was made in the database. By comparing the value for payload.source.ts_ms with the value for payload.ts_ms, you can determine the lag between the source database update and Debezium.
|
||||
|
||||
|2
|
||||
|`databaseName` +
|
||||
`schemaName`
|
||||
|Identifies the database and the schema that contain the change.
|
||||
|
||||
|2
|
||||
|3
|
||||
|`ddl`
|
||||
|Always `null` for the Db2 connector.
|
||||
For other connectors, this field contains the DDL responsible for the schema change.
|
||||
This DDL is not available to Db2 connectors.
|
||||
|
||||
|3
|
||||
|4
|
||||
|`tableChanges`
|
||||
|An array of one or more items that contain the schema changes generated by a DDL command.
|
||||
|
||||
|4
|
||||
|5
|
||||
|`type`
|
||||
a|Describes the kind of change. The value is one of the following:
|
||||
|
||||
@ -377,19 +384,19 @@ a|Describes the kind of change. The value is one of the following:
|
||||
* `ALTER` - table modified
|
||||
* `DROP` - table deleted
|
||||
|
||||
|5
|
||||
|6
|
||||
|`id`
|
||||
|Full identifier of the table that was created, altered, or dropped.
|
||||
|
||||
|6
|
||||
|7
|
||||
|`table`
|
||||
|Represents table metadata after the applied change.
|
||||
|
||||
|7
|
||||
|8
|
||||
|`primaryKeyColumnNames`
|
||||
|List of columns that compose the table's primary key.
|
||||
|
||||
|8
|
||||
|9
|
||||
|`columns`
|
||||
|Metadata for each column in the changed table.
|
||||
|
||||
|
@ -176,14 +176,14 @@ The format of the messages that a connector emits to its schema change topic is
|
||||
The following example shows a typical schema change message in JSON format.
|
||||
The message contains a logical representation of the table schema.
|
||||
|
||||
[source,json,subs="attributes"]
|
||||
[source,json,indent=0,subs="+attributes"]
|
||||
----
|
||||
{
|
||||
"schema": {
|
||||
...
|
||||
},
|
||||
"payload": {
|
||||
"source": { // (1)
|
||||
"source": { // <1>
|
||||
"version": "{debezium-version}",
|
||||
"connector": "mysql",
|
||||
"name": "dbserver1",
|
||||
@ -200,19 +200,20 @@ The message contains a logical representation of the table schema.
|
||||
"thread": null,
|
||||
"query": null
|
||||
},
|
||||
"databaseName": "inventory", // (2)
|
||||
"ts_ms": 1580390884335, // <2>
|
||||
"databaseName": "inventory", // <3>
|
||||
"schemaName": null,
|
||||
"ddl": "ALTER TABLE customers ADD COLUMN middle_name VARCHAR(2000)", // (3)
|
||||
"tableChanges": [ // (4)
|
||||
"ddl": "ALTER TABLE customers ADD COLUMN middle_name VARCHAR(2000)", // <4>
|
||||
"tableChanges": [ // <5>
|
||||
{
|
||||
"type": "ALTER", // (5)
|
||||
"id": "\"inventory\".\"customers\"", // (6)
|
||||
"table": { // (7)
|
||||
"type": "ALTER", // <6>
|
||||
"id": "\"inventory\".\"customers\"", // <7>
|
||||
"table": { // <8>
|
||||
"defaultCharsetName": "latin1",
|
||||
"primaryKeyColumnNames": [ // (8)
|
||||
"primaryKeyColumnNames": [ // <9>
|
||||
"id"
|
||||
],
|
||||
"columns": [ // (9)
|
||||
"columns": [ // <10>
|
||||
{
|
||||
"name": "id",
|
||||
"jdbcType": 4,
|
||||
@ -320,12 +321,18 @@ The message contains a logical representation of the table schema.
|
||||
This field is useful to correlate events on different topics.
|
||||
|
||||
|2
|
||||
|`ts_ms`
|
||||
|Optional field that displays the time at which the connector processed the event. The time is based on the system clock in the JVM running the Kafka Connect task.
|
||||
|
||||
In the source object, ts_ms indicates the time that the change was made in the database. By comparing the value for payload.source.ts_ms with the value for payload.ts_ms, you can determine the lag between the source database update and Debezium.
|
||||
|
||||
|3
|
||||
|`databaseName` +
|
||||
`schemaName`
|
||||
|Identifies the database and the schema that contains the change.
|
||||
The value of the `databaseName` field is used as the message key for the record.
|
||||
|
||||
|3
|
||||
|4
|
||||
|`ddl`
|
||||
|This field contains the DDL that is responsible for the schema change.
|
||||
The `ddl` field can contain multiple DDL statements.
|
||||
@ -336,11 +343,11 @@ Clients can submit multiple DDL statements that apply to multiple databases.
|
||||
If MySQL applies them atomically, the connector takes the DDL statements in order, groups them by database, and creates a schema change event for each group.
|
||||
If MySQL applies them individually, the connector creates a separate schema change event for each statement.
|
||||
|
||||
|4
|
||||
|5
|
||||
|`tableChanges`
|
||||
|An array of one or more items that contain the schema changes generated by a DDL command.
|
||||
|
||||
|5
|
||||
|6
|
||||
|`type`
|
||||
a|Describes the kind of change. The value is one of the following:
|
||||
|
||||
@ -348,20 +355,20 @@ a|Describes the kind of change. The value is one of the following:
|
||||
`ALTER`:: Table modified.
|
||||
`DROP`:: Table deleted.
|
||||
|
||||
|6
|
||||
|7
|
||||
|`id`
|
||||
|Full identifier of the table that was created, altered, or dropped.
|
||||
In the case of a table rename, this identifier is a concatenation of `_<old>_,_<new>_` table names.
|
||||
|
||||
|7
|
||||
|8
|
||||
|`table`
|
||||
|Represents table metadata after the applied change.
|
||||
|
||||
|8
|
||||
|9
|
||||
|`primaryKeyColumnNames`
|
||||
|List of columns that compose the table's primary key.
|
||||
|
||||
|9
|
||||
|10
|
||||
|`columns`
|
||||
|Metadata for each column in the changed table.
|
||||
|
||||
|
@ -241,7 +241,7 @@ The message contains a logical representation of the table schema.
|
||||
"version": "{debezium-version}",
|
||||
"connector": "oracle",
|
||||
"name": "server1",
|
||||
"ts_ms": 1588252618953,
|
||||
"ts_ms": 0,
|
||||
"snapshot": "true",
|
||||
"db": "ORCLPDB1",
|
||||
"schema": "DEBEZIUM",
|
||||
@ -251,19 +251,20 @@ The message contains a logical representation of the table schema.
|
||||
"commit_scn": "1513734",
|
||||
"lcr_position" : null
|
||||
},
|
||||
"databaseName": "ORCLPDB1", // <1>
|
||||
"ts_ms": 1588252618953, // <1>
|
||||
"databaseName": "ORCLPDB1", // <2>
|
||||
"schemaName": "DEBEZIUM", //
|
||||
"ddl": "CREATE TABLE \"DEBEZIUM\".\"CUSTOMERS\" \n ( \"ID\" NUMBER(9,0) NOT NULL ENABLE, \n \"FIRST_NAME\" VARCHAR2(255), \n \"LAST_NAME" VARCHAR2(255), \n \"EMAIL\" VARCHAR2(255), \n PRIMARY KEY (\"ID\") ENABLE, \n SUPPLEMENTAL LOG DATA (ALL) COLUMNS\n ) SEGMENT CREATION IMMEDIATE \n PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 \n NOCOMPRESS LOGGING\n STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645\n PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1\n BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)\n TABLESPACE \"USERS\" ", // <2>
|
||||
"tableChanges": [ // <3>
|
||||
"ddl": "CREATE TABLE \"DEBEZIUM\".\"CUSTOMERS\" \n ( \"ID\" NUMBER(9,0) NOT NULL ENABLE, \n \"FIRST_NAME\" VARCHAR2(255), \n \"LAST_NAME" VARCHAR2(255), \n \"EMAIL\" VARCHAR2(255), \n PRIMARY KEY (\"ID\") ENABLE, \n SUPPLEMENTAL LOG DATA (ALL) COLUMNS\n ) SEGMENT CREATION IMMEDIATE \n PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 \n NOCOMPRESS LOGGING\n STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645\n PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1\n BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)\n TABLESPACE \"USERS\" ", // <3>
|
||||
"tableChanges": [ // <4>
|
||||
{
|
||||
"type": "CREATE", // <4>
|
||||
"id": "\"ORCLPDB1\".\"DEBEZIUM\".\"CUSTOMERS\"", // <5>
|
||||
"table": { // <6>
|
||||
"type": "CREATE", // <5>
|
||||
"id": "\"ORCLPDB1\".\"DEBEZIUM\".\"CUSTOMERS\"", // <6>
|
||||
"table": { // <7>
|
||||
"defaultCharsetName": null,
|
||||
"primaryKeyColumnNames": [ // <7>
|
||||
"primaryKeyColumnNames": [ // <8>
|
||||
"ID"
|
||||
],
|
||||
"columns": [ // <8>
|
||||
"columns": [ // <9>
|
||||
{
|
||||
"name": "ID",
|
||||
"jdbcType": 2,
|
||||
@ -334,19 +335,25 @@ The message contains a logical representation of the table schema.
|
||||
|Item |Field name |Description
|
||||
|
||||
|1
|
||||
|`ts_ms`
|
||||
|Optional field that displays the time at which the connector processed the event. The time is based on the system clock in the JVM running the Kafka Connect task.
|
||||
|
||||
In the source object, ts_ms indicates the time that the change was made in the database. By comparing the value for payload.source.ts_ms with the value for payload.ts_ms, you can determine the lag between the source database update and Debezium.
|
||||
|
||||
|2
|
||||
|`databaseName` +
|
||||
`schemaName`
|
||||
|Identifies the database and the schema that contains the change.
|
||||
|
||||
|2
|
||||
|3
|
||||
|`ddl`
|
||||
|This field contains the DDL that is responsible for the schema change.
|
||||
|
||||
|3
|
||||
|4
|
||||
|`tableChanges`
|
||||
|An array of one or more items that contain the schema changes generated by a DDL command.
|
||||
|
||||
|4
|
||||
|5
|
||||
|`type`
|
||||
a|Describes the kind of change. The value is one of the following:
|
||||
|
||||
@ -354,20 +361,20 @@ a|Describes the kind of change. The value is one of the following:
|
||||
`ALTER`:: Table modified.
|
||||
`DROP`:: Table deleted.
|
||||
|
||||
|5
|
||||
|6
|
||||
|`id`
|
||||
|Full identifier of the table that was created, altered, or dropped.
|
||||
In the case of a table rename, this identifier is a concatenation of `_<old>_,_<new>_` table names.
|
||||
|
||||
|6
|
||||
|7
|
||||
|`table`
|
||||
|Represents table metadata after the applied change.
|
||||
|
||||
|7
|
||||
|8
|
||||
|`primaryKeyColumnNames`
|
||||
|List of columns that compose the table's primary key.
|
||||
|
||||
|8
|
||||
|9
|
||||
|`columns`
|
||||
|Metadata for each column in the changed table.
|
||||
|
||||
|
@ -267,7 +267,7 @@ The message contains a logical representation of the table schema.
|
||||
"version": "{debezium-version}",
|
||||
"connector": "sqlserver",
|
||||
"name": "server1",
|
||||
"ts_ms": 1588252618953,
|
||||
"ts_ms": 0,
|
||||
"snapshot": "true",
|
||||
"db": "testDB",
|
||||
"schema": "dbo",
|
||||
@ -276,19 +276,20 @@ The message contains a logical representation of the table schema.
|
||||
"commit_lsn": "00000025:00000d98:00a2",
|
||||
"event_serial_no": null
|
||||
},
|
||||
"databaseName": "testDB", // <1>
|
||||
"ts_ms": 1588252618953, // <1>
|
||||
"databaseName": "testDB", // <2>
|
||||
"schemaName": "dbo",
|
||||
"ddl": null, // <2>
|
||||
"tableChanges": [ // <3>
|
||||
"ddl": null, // <3>
|
||||
"tableChanges": [ // <4>
|
||||
{
|
||||
"type": "CREATE", // <4>
|
||||
"id": "\"testDB\".\"dbo\".\"customers\"", // <5>
|
||||
"table": { // <6>
|
||||
"type": "CREATE", // <5>
|
||||
"id": "\"testDB\".\"dbo\".\"customers\"", // <6>
|
||||
"table": { // <7>
|
||||
"defaultCharsetName": null,
|
||||
"primaryKeyColumnNames": [ // <7>
|
||||
"primaryKeyColumnNames": [ // <8>
|
||||
"id"
|
||||
],
|
||||
"columns": [ // <8>
|
||||
"columns": [ // <9>
|
||||
{
|
||||
"name": "id",
|
||||
"jdbcType": 4,
|
||||
@ -359,21 +360,27 @@ The message contains a logical representation of the table schema.
|
||||
|Item |Field name |Description
|
||||
|
||||
|1
|
||||
|`ts_ms`
|
||||
|Optional field that displays the time at which the connector processed the event. The time is based on the system clock in the JVM running the Kafka Connect task.
|
||||
|
||||
In the source object, ts_ms indicates the time that the change was made in the database. By comparing the value for payload.source.ts_ms with the value for payload.ts_ms, you can determine the lag between the source database update and Debezium.
|
||||
|
||||
|2
|
||||
|`databaseName` +
|
||||
`schemaName`
|
||||
|Identifies the database and the schema that contain the change.
|
||||
|
||||
|2
|
||||
|3
|
||||
|`ddl`
|
||||
|Always `null` for the SQL Server connector.
|
||||
For other connectors, this field contains the DDL responsible for the schema change.
|
||||
This DDL is not available to SQL Server connectors.
|
||||
|
||||
|3
|
||||
|4
|
||||
|`tableChanges`
|
||||
|An array of one or more items that contain the schema changes generated by a DDL command.
|
||||
|
||||
|4
|
||||
|5
|
||||
|`type`
|
||||
a|Describes the kind of change. The value is one of the following:
|
||||
|
||||
@ -381,19 +388,19 @@ a|Describes the kind of change. The value is one of the following:
|
||||
* `ALTER` - table modified
|
||||
* `DROP` - table deleted
|
||||
|
||||
|5
|
||||
|6
|
||||
|`id`
|
||||
|Full identifier of the table that was created, altered, or dropped.
|
||||
|
||||
|6
|
||||
|7
|
||||
|`table`
|
||||
|Represents table metadata after the applied change.
|
||||
|
||||
|7
|
||||
|8
|
||||
|`primaryKeyColumnNames`
|
||||
|List of columns that compose the table's primary key.
|
||||
|
||||
|8
|
||||
|9
|
||||
|`columns`
|
||||
|Metadata for each column in the changed table.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user