CREATE TABLE DEPT
(
DEPTNO CHAR(3) NOT NULL,
DEPTNAME VARCHAR(36) NOT NULL,
MGRNO CHAR(6),
ADMRDEPT CHAR(3) NOT NULL,
LOCATION CHAR(16)
);
----------------------------------------------------------------------
-- Name: FILETOKAF: FILE To Kafka
----------------------------------------------------------------------
-- SUBSTITUTION PARMS USED IN THIS SCRIPT:
----------------------------------------------------------------------
JOBNAME FILETOKAFKA;
;
----------------------------
-- TABLE DESCRIPTIONS
----------------------------
BEGIN GROUP SOURCE_TABLES;
DESCRIPTION Db2SQL DEPT.ddl AS DEPTJSON;
END GROUP;
------------------------------------------------------------
-- DATASTORE SECTION
------------------------------------------------------------
-- SOURCE DATASTORE
DATASTORE cdc://server:port/capture/target
OF UTSCDC
AS CDCIN
DESCRIBED BY GROUP SOURCE_TABLES;
-- TARGET DATASTORE
DATASTORE kafka:///DEPTJSON/key
OF JSON FORMAT [CONFLUENT [TOMBSTONE]
AS TARGET
KEY IS DEPTNO, MGRNO
DESCRIBED BY GROUP SOURCE_TABLES;
----------------------------------
PROCESS INTO TARGET
SELECT
{
REPLICATE(TARGET)
}
FROM CDCIN;