averemee-si/oracdc

Can you add more field XID, RID to schema (Kafka message)?

sonnguyen-dba opened this issue · 4 comments

Hi Aleksej,

With message example now push to schema.
{
"schema" : {
"type" : "struct",
"fields" : [ {
"type" : "string",
"optional" : false,
"field" : "op"
}, {
"type" : "int8",
"optional" : true,
"field" : "ts_ms"
}, {
"type" : "struct",
"fields" : [ {
"type" : "int8",
"optional" : false,
"field" : "DEPTNO"
} ],
"optional" : false,
"name" : "SCOTT.DEPT.Key",
"version" : 1,
"field" : "before"
}, {
"type" : "struct",
"fields" : [ {
"type" : "int8",
"optional" : false,
"field" : "DEPTNO"
}, {
"type" : "string",
"optional" : true,
"field" : "DNAME"
}, {
"type" : "string",
"optional" : true,
"field" : "LOC"
} ],
"optional" : true,
"name" : "SCOTT.DEPT.Value",
"version" : 1,
"field" : "after"
}, {
"type" : "struct",
"fields" : [ {
"type" : "int8",
"optional" : false,
"field" : "instance_number"
}, {
"type" : "string",
"optional" : false,
"field" : "version"
}, {
"type" : "string",
"optional" : false,
"field" : "instance_name"
}, {
"type" : "string",
"optional" : false,
"field" : "host_name"
}, {
"type" : "int8",
"optional" : false,
"field" : "dbid"
}, {
"type" : "string",
"optional" : false,
"field" : "database_name"
}, {
"type" : "string",
"optional" : false,
"field" : "platform_name"
}, {
"type" : "string",
"optional" : true,
"field" : "query"
}, {
"type" : "string",
"optional" : true,
"field" : "pdb_name"
}, {
"type" : "string",
"optional" : true,
"field" : "owner"
}, {
"type" : "string",
"optional" : true,
"field" : "table"
}, {
"type" : "int8",
"optional" : false,
"field" : "scn"
}, {
"type" : "int8",
"optional" : false,
"field" : "ts_ms"
} ],
"optional" : false,
"name" : "eu.solutions.a2.cdc.oracle.Source",
"field" : "source"
} ],
"optional" : false,
"name" : "SCOTT.DEPT.Envelope"
},
"payload" : {
"op" : "d",
"ts_ms" : 1580465954794,
"before" : {
"DEPTNO" : 50
},
"after" : null,
"source" : {
"instance_number" : 1,
"version" : "12.1.0.2.0",
"instance_name" : "EBSDB",
"host_name" : "apps.example.com",
"dbid" : 710804450,
"database_name" : "EBSDB",
"platform_name" : "Linux x86 64-bit",
"query" : null,
"pdb_name" : null,
"owner" : "SCOTT",
"table" : "DEPT",
"scn" : 12204753723754,
"ts_ms" : 1580464499942
}
}
}

Now Can you add more fields example:

{
"schema" : {
"type" : "struct",
"fields" : [ {
"type" : "string",
"optional" : false,
"field" : "op"
}, {
"type" : "int8",
"optional" : true,
"field" : "ts_ms"
}, {
"type" : "struct",
"fields" : [ {
"type" : "int8",
"optional" : false,
"field" : "DEPTNO"
} ],
"optional" : false,
"name" : "SCOTT.DEPT.Key",
"version" : 1,
"field" : "before"
}, {
"type" : "struct",
"fields" : [ {
"type" : "int8",
"optional" : false,
"field" : "DEPTNO"
}, {
"type" : "string",
"optional" : true,
"field" : "DNAME"
}, {
"type" : "string",
"optional" : true,
"field" : "LOC"
} ],
"optional" : true,
"name" : "SCOTT.DEPT.Value",
"version" : 1,
"field" : "after"
}, {
"type" : "struct",
"fields" : [ {
"type" : "int8",
"optional" : false,
"field" : "instance_number"
}, {
"type" : "string",
"optional" : false,
"field" : "version"
}, {
"type" : "string",
"optional" : false,
"field" : "instance_name"
}, {
"type" : "string",
"optional" : false,
"field" : "host_name"
}, {
"type" : "int8",
"optional" : false,
"field" : "dbid"
}, {
"type" : "string",
"optional" : false,
"field" : "database_name"
}, {
"type" : "string",
"optional" : false,
"field" : "platform_name"
}, {
"type" : "string",
"optional" : true,
"field" : "query"
}, {
"type" : "string",
"optional" : true,
"field" : "pdb_name"
}, {
"type" : "string",
"optional" : true,
"field" : "owner"
}, {
"type" : "string",
"optional" : true,
"field" : "table"
}, {
"type" : "int8",
"optional" : false,
"field" : "scn"
}, {
"type" : "int8",
"optional" : false,
"field" : "ts_ms"
} ],
"optional" : false,
"name" : "eu.solutions.a2.cdc.oracle.Source",
"field" : "source"
} ],
"optional" : false,
"name" : "SCOTT.DEPT.Envelope"
},
"payload" : {
"op" : "d",
"ts_ms" : 1580465954794,
"before" : {
"DEPTNO" : 50
},
"after" : null,
"source" : {
"instance_number" : 1,
"version" : "12.1.0.2.0",
"instance_name" : "EBSDB",
"host_name" : "apps.example.com",
"dbid" : 710804450,
"database_name" : "EBSDB",
"platform_name" : "Linux x86 64-bit",
"query" : null,
"pdb_name" : null,
"owner" : "SCOTT",
"table" : "DEPT",
"scn" : 12204753723754,
"ts_ms" : 1580464499942
"rid" : xxxxxxxxxxxx,
"xid" : xxxxxxxxxxx

}
}
}

Regards,
Son

Hi Son!

Working on it.
Will back with solution soon.

Regards,
Aleksei

Hi Aleksej,
Thank you very much!
I'll waiting good news from you. :))
Regards,
Son

Hi Aleksej,
Thank you very much for more information.
Regards,
Son