I am new to synchronous capture and apply processes.
I am trying to implement a simple transformation.
If a row is inserted into source table, I want the new record to be unpivoted and placed in a destination table.
Source table is created as follows:
CREATE TABLE HR.PIVOTED_DATA
(id NUMBER,
customer_id NUMBER,
product_code_a NUMBER,
product_code_b NUMBER,
product_code_c NUMBER,
product_code_d NUMBER);
COMMIT;
INSERT INTO hr.pivoted_data VALUES (1, 101, 10, 20, 30, NULL);
INSERT INTO hr.pivoted_data VALUES (2, 102, 40, NULL, 50, NULL);
INSERT INTO hr.pivoted_data VALUES (3, 103, 60, 70, 80, 90);
INSERT INTO hr.pivoted_data VALUES (4, 104, 100, NULL, NULL, NULL);
COMMIT;
destination table structure is as follows:
CREATE TABLE HR.PIVOTED_DATA
(id NUMBER,
customer_id NUMBER,
product VARCHAR2,
Quantity NUMBER)
]
I have created the apply process. Now the next step is to do the custom transformation. How do I achieve this "unpivot" transformation in the apply process?
Thanks in advance,
Shree_z