Example: Db2z to Avro Kafka - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
Last edition
2024-07-30
Last publish date
2024-07-30T20:19:56.898694
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;
OPTIONS
   USE AVRO COMPATIBLE NAMES 
   ,CONFLUENT REPOSITORY "https://XXXX:XXXX@XXXX.aws.confluent.cloud"
;
----------------------------
-- TABLE DESCRIPTIONS
----------------------------
BEGIN GROUP SOURCE_TABLES;
DESCRIPTION Db2SQL DEPT.ddl AS DEPT2 SUBJECT DEPT2-value KEY SUBJECT DEPT2-key;
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:///DEPT2/key     
          OF AVRO FORMAT [CONFLUENT | CONFLUENT TOMBSTONE | CONTAINER | PLAIN]
          AS TARGET
          KEY IS DEPTNO, MGRNO
          DESCRIBED BY GROUP SOURCE_TABLES;
----------------------------------
PROCESS INTO TARGET
SELECT
{
    REPLICATE(TARGET)
}
FROM CDCIN;