GGMicroservices

Update March 20, 2019

Data Transformation

Introduction

This lab walk you through some simple examples of doing Data Transformations in the Oracle GoldenGate Microservices Web Interface.

This lab supports the following use cases:

Objectives

STEP 1: Log into VNC client and prepare environment for the data transformation lab.

In this step you will use VNC client to connect with Oracle 18c database environment(Ravello image), to get started with the installation of Oracle GoldenGate Mircoservices Architecture.

STEP 2: Open up a terminal window and reset the deployment/replication.

STEP 4: Log into the web client and check current replication processes.

Note: You will be required to login again. Use the same Administrator account that was used with the Service Manager.

STEP 5: Concatenating the source ‘m‘columns into target single ‘n’ columns.

Query in side the script for insert : INSERT INTO SOE.CUSTOMERS VALUES (12345678,’LARRY’,’ELLISON’,’NY’,’NEW YORK’,’5000’,’LARRY@ORACLE.COM’,’365’,’15-OCT- 11’,’BUSINESS’,’MUSIC’,’4-JAN-61’,’Y’,’N’,’2767122’,’126219999’); Commit;

STEP 6: Masking the Source Crucial email-id’s into a dummy email in the target.

STEP 7: Using Environment Variables/Tokens.

REPLICAT REP1 param file will look like :

    Replicat     REP1
    UseridAlias TGGATE2

    MAP OGGOOW181.SOE.LOGON, TARGET OGGOOW182.SOE.LOGON_AUDIT, KEYCOLS(LOGON_ID), &
            COLMAP (USEDEFAULTS,&
            host=@GETENV('GGENVIRONMENT','HOSTNAME'),&
            gg_group=@GETENV ('GGENVIRONMENT','GROUPNAME'),&
            osuser=@GETENV ('GGENVIRONMENT','OSUSERNAME'),&
            domain=@GETENV ('GGENVIRONMENT','DOMAINNAME'),&
            ba_ind=@GETENV ('GGHEADER','BEFOREAFTERINDICATOR'),&
            commit=@GETENV ('GGHEADER','COMMITTIMESTAMP'),&
            pos=@GETENV ('GGHEADER','LOGPOSITION'),&
            rba=@GETENV ('GGHEADER','LOGRBA'),&
            tablename=@GETENV ('GGHEADER','TABLENAME'),&
            optype=@GETENV ('GGHEADER','OPTYPE'));

    --map oggoow181.soe.customers, target soe.customers, keycols(customer_id);
    --MAP OGGOOW181.SOE.CUSTOMERS, TARGET OGGOOW182.SOE.CUSTOMERS, KEYCOLS(customer_id), &
       --      COLMAP (USEDEFAULTS,CUSTOMER_NAME =@STRCAT(CUST_FIRST_NAME,' ',CUST_LAST_NAME));

    MAP OGGOOW181.SOE.CUSTOMERS, TARGET OGGOOW182.SOE.CUSTOMERS, keycols(customer_id), &
               SQLEXEC (SPNAME P_MAIL, PARAMS (code_param = CUST_EMAIL)), &
               COLMAP (USEDEFAULTS, CUST_EMAIL = P_MAIL.desc_param,CUSTOMER_NAME =@STRCAT(CUST_FIRST_NAME,CUST_LAST_NAME));

    map oggoow181.soe.addresses,target soe.addresses, keycols(address_id);
    map oggoow181.soe.orders, target soe.orders, keycols(order_id);
    map oggoow181.soe.order_items, target soe.order_items, keycols(order_id, line_item_id);
    map oggoow181.soe.card_details, target soe.card_details, keycols(card_id);
    map oggoow181.soe.logon, target soe.logon;
    map oggoow181.soe.product_information, target soe.product_information;
    map oggoow181.soe.inventories, target soe.inventories, keycols(product_id, warehouse_id);
    map oggoow181.soe.product_descriptions, target soe.product_descriptions;
    map oggoow181.soe.warehouses, target soe.warehouses;
    map oggoow181.soe.orderentry_metadata, target soe.orderentry_metadata;

You have completed lab 800! Great Job!

Click here to return