Relational datastores - 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
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

Example 1: Define a Relational Datastore using DDL

The most common way to define a relational datastore is to use a file containing Data Definition Language (DDL). Define the relational table EMPLOYEE as source datastore that uses the DDL in file employee.ddl as its format.
DESCRIPTION SQLDDL /home/sqdata/employee.ddl AS EMPLOYEE_DDL;

DATASTORE EMPLOYEE_IN
         OF RELATIONAL
         AS EMPLOYEE_IN
         DESCRIBED BY EMPLOYEE_DDL;

Example 2: Define a Relational Datastore using the RDBMS catalog

An alternative method for defining a relational datastore uses the catalog of the relational database. Define the relational table EMPLOYEE_OUT as a target datastore that uses this layout. Extract the datastore definition for the relational target datastore table EMPLOYEE_OUT by first creating a file (employee.sql) containing the following SQL SELECT statement (must end with a semicolon). Note, use of a SELECT statement to define the layout of a relational table requires the use of the RDBMS command and access to the RDBMS catalog from the system where the Apply Engine script is parsed.

SELECT * FROM EMPLOYEE_OUT;

Next, specify the target datastore using the SQLDML Description Type and the employee.sql file to describe the column attributes of the EMPLOYEE_OUT table.
RDBMS SAMPLE userid password;

DESCRIPTION SQLDML /home/sqdata/employee.sql AS EMPLOYEE_DML;

DATASTORE EMPLOYEE_OUT
         OF RELATIONAL
         AS EMPLOYEE_OUT
         DESCRIBED BY EMPLOYEE_DML;

Example 3: Use DDL and the RDBMS catalog to define datastore formats

This example combines the two (2) previous examples, using DDL to define the source datastore and the RDBMS catalog to define the target datastore. This is a more realistic example because the Apply Engine script will more likely be run on the system containing the target datastore and therefore have access to the RDBMS catalog of the target. The need for the database connection to parse the script makes the use of SQLDML somewhat less practical. It is important to understand the operating characteristics of your environment before deciding which approach will work best.
RDBMS SAMPLE;

DESCRIPTION SQLDDL employee.ddl AS EMPLOYEE_DDL;
DESCRIPTION SQLDML employee.sql AS EMPLOYEE_DML;

DATASTORE EMPLOYEE_IN
  OF RELATIONAL
  AS EMPLOYEE_IN
  DESCRIBED BY EMPLOYEE_DDL;

DATASTORE EMPLOYEE_OUT
  OF RELATIONAL
  AS EMPLOYEE_OUT
  DESCRIBED BY EMPLOYEE_DML;