How to Transform a Schema Name in Streams Using Declarative Rule Transformations
(Doc ID 784126.1)
Last updated on JULY 20, 2023
Applies to:
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and laterOracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 10.2 to 11.2
Goal
The following is a complete code sample that configures unidirectional streams replication and transforms the source schema name 'HR' into schema 'HR_DEMO' at the destination site for DML operations.
The sample code uses a declarative rule-based transformation to transform the schema name.
You can specify multiple declarative transformations per rule. If multiple transformations are specified for a single rule, the following is the default ordering in which the transformations are applied:
1. Delete Column
2. Rename Column
3. Add Column
4. Rename Table
5. Rename Schema
The results of each transformation would be used in the next step.
Declarative rule transformations are available in 10.2x and later.
For earlier releases a custom rule-based transformation can be implemented.
Note that declarative rule-based transformations can transform row LCRs only. These row LCRs can be captured row LCRs or user-enqueued row LCRs. For DDL commands a custom rule transformation can be used in conjunction with the declarative rule transformation. Also, note that declarative transformations are performed before rule-based transformations.
Refer to the notes in the Reference section of this article for code samples of custom rule-based transformations and more information on declarative transformations and other transformations that can be performed.
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |
Requirements |
Configuring |
Instructions |
Sample Code |
Sample Output |
References |