Join two source tables and replicat into a target table with BLOB

Hi,
I am working on an integration to source transaction data from legacy application to ESB using GG.
What I need to do is join two source tables (to de-normalize the area_id) to form the transaction detail, then transform by concatenate the transaction detail fields into a value only CSV, replicate it on the target ESB IN_DATA table's BLOB content field.
Based on what I had researched, lookup by join two source tables require SQLEXEC, which doesn't support BLOB.
What alternatives are there and what GG recommend in such use case?
Any helpful advice is much appreciated.
thanks,
Xiaocun

Xiaocun,
Not sure what you're data looks like but it's possible the the comma separated value (CSV) requirement may be solved by something like this in your MAP statement:
colmap (usedefaults,
my_blob = @STRCAT (col02, ",", col03, ",", col04)
Since this is not 1:1 you'll be using a sourcedefs file, which is nice because it will do the datatype conversion for you under the covers (also a nice trick when migrating long raws to blobs). So col02 can be varchar2, col03 a number, and col04 a clob and they'll convert in real-time.
Mapping two tables to one is simple enough with two MAP statements, the harder challenge is joining operations from separate transactions because OGG is operation based and doesn't work on aggregates. It's possible you could end up using a combination of built in parameters and funcations with SQLEXEC and SQL/PL/SQL for more complicated scenarios, all depending on the design of the target table. But you have several scenarios to address.
For example, is the target table really a history table or are you actually going to delete from it? If just the child is deleted but you don't want to delete the whole row yet, you may want to use NOCOMPRESSDELETES & UPDATEDELETES and COLMAP a new flag column to denote it was deleted. It's likely that the insert on the child may really mean an update to the target (see UPDATEINSERTS).
If you need to update the LOB by appending or prepending new data then that's going to require some custom work, staging tables and a looping script, or a user exit.
Some parameters you may want to become familiar with if not already:
COLS | COLSEXCEPT
COLMAP
OVERRIDEDUPS
INSERTDELETES
INSERTMISSINGUPDATES
INSERTUPDATES
GETDELETES | IGNOREDELETES
GETINSERTS | IGNOREINSERTS
GETUPDATES | IGNOREUPDATES
Good luck,
-joe

Similar Messages

  • Import data from few tables and export into the same tables on different db

    I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
    to the same tables. how can i do the import?
    Its urgent can anyone please help me do this?
    Thanks.

    Hello Junior DBA,
    maybe try it with the "copy command".
    http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
    Have a look at the section "Understanding COPY Command Syntax".
    Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
    Stefan

  • Read a csv file, fill a dynamic table and insert into a standard table

    Hi everybody,
    I have a problem here and I need your help:
    I have to read a csv file and insert the data of it into a standard table.
    1 - On the parameter scrreen I have to indicate the standard table and the csv file.
    2 - I need to create a dynamic table. The same type of the one I choose at parameter screen.
    3 - Then I need to read the csv and put the data into this dynamic table.
    4 - Later I need to insert the data from the dynamic table into the standard table (the one on the parameter screen).
    How do I do this job? Do you have an example? Thanks.

    Here is an example table which shows how to upload a csv file from the frontend to a dynamic internal table.  You can of course modify this to update your database table.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: xcel type table of alsmex_tabline with header line.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    * Upload the excel
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = p_file
                i_begin_col             = '1'
                i_begin_row             = '1'
                i_end_col               = '200'
                i_end_row               = '5000'
           tables
                intern                  = xcel
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
    * Reformt to dynamic internal table
      loop at xcel.
        assign component xcel-col of structure <dyn_wa> to <dyn_field>.
        if sy-subrc = 0.
         <dyn_field> = xcel-value.
        endif.
        at end of row.
          append <dyn_wa> to <dyn_table>.
          clear <dyn_wa>.
        endat.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    REgards,
    RIch Heilman

  • How to join  fields from different internal tables and display into one int

    hai i have one doubt...
    how to join  fields from different internal tables and display into one internal table..
    if anybody know the ans for this qus tell me......

    hii
    you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
    SELECT bwkey                         " Valuation Area
             bukrs                         " Company Code
        FROM t001k
        INTO TABLE i_t001k
       WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT bwkey                       " Valuation Area
               werks                       " Plant
          FROM t001w
          INTO TABLE i_t001w
           FOR ALL ENTRIES IN i_t001k
         WHERE bwkey = i_t001k-bwkey
           AND werks IN s_werks.
        IF sy-subrc EQ 0.
          LOOP AT i_output INTO wa_output.
            READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
            READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
            wa_output-bukrs = wa_t001k-bukrs.
            MODIFY i_output FROM wa_output.
            CLEAR wa_output.
          ENDLOOP.                         " LOOP AT i_output
        ENDIF.                             " IF sy-subrc EQ 0
    regards
    twinkal

  • Read data from E$ table and insert into staging table

    Hi all,
    I am a new to ODI. I want your help in understanding how to read data from an "E$" table and insert into a staging table.
    Scenario:
    Two columns in a flat file, employee id and employee name, needs to be loaded into a datastore EMP+. A check constraint is added to allow data with employee names in upper case only to be loaded into the datastore. Check control is set to flow and static. Right click on the datastore, select control and then check. The rows that have violated the check constraint are kept in E$_EMP+ table.
    Problem:
    Issue is that I want to read the data from the E$_EMP+ table and transform the employee name into uppercase and move the corrected data from E$_EMP+ into EMP+. Please advise me on how to automatically handle "soft" exceptions in ODI.
    Thank you

    Hi Himanshu,
    I have tried the approach you suggested already. That works. However, the scenario I described was very basic. Based on the error logged into the E$_EMP table, I will have to design the interface to apply more business logic before the data is actually merged into the target table.
    Before the business logic is applied, I need to read each row from the E$EMP table first and I do not know how to read from E$EMP table.

  • Join tables and replicate (multiple rows)

    Hi,
    i have two tables TAB1 (A, B, C) and TAB2 (C, D)
    i want to join the tables and replicat such that the resultant table TAB3 has columns A, B, D
    select x.a, x.b, y.d from tab1 x join tab2 y on x.c=y.c where y.d=1;
    but the problem here is that the above command gives multiple rows and i need all those to be in the target table. When i am using SQLEXEC-QUERY in the mapping, only the first search result is being entered into the TAB3. Then i Found out that sqlexec will return only one value. But i need all the search results to be replicated.
    What alternatives are there and what GG recommend in such use case?
    Any helpful advice is much appreciated.
    thanks,
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

    the problem to use SP to check every time before insert/update is that there will be around 15 tables not 2 and there will be lakhs of rows in each table, SP which checks every insert will cause a lot of overhead and lag. I cannot afford that.
    More over there will be around 60 values of D and or each value of D there will be Lakhs of rows associated in TAB1
    I need to set up different extract and replicat processes for each set of rows associated with each value of D
    for example the values of column D are 1-30
    for D=1 there are 1.5lakh rows in TAB1 and EXT1, REP1 for this set of rows
    D=2 => 2lakhs rows in TAB2 and EXT2, REP2 for this set of rows
    D=3 => 1lakhs rows in TAB2 and EXT3, REP3 for this set of rows...etc
    this is to ensure that if i want to stop replicating data associated with D=1(which i need to do) i can stop only REP1 and keep the rest of the data associated with D=2-30 in sync
    As far as materialized views are concerned, i need to do it with goldengate only
    Thanks

  • How to join two Source tables

    Hi
    I am doing a POC on joing two MSSQL 2K source tables and populating into Oracle table.
    I did not find the joiner operator and other transformation operators.
    Can anyone help me in using them?
    Thanks,
    Ganesh

    Hi,
    First, just drag&drop the two source table in the interface.
    Then, connect the two tables with eachother using your mouse while selecting the two columns that you want to use in your join.
    Transformations can be found when selecting a field in your target datastore; you will see a screen appear in the 'properties-panel' of your interface-editor; here you can edit transformations.
    Good luck ...
    Steffen

  • Insert items from two different Multiple Select Lists into a single table

    I need help. I have a training tracking system that tracks the courses taken by employees.
    I have created two multiple select lists, one is SelectEmployees and the other is SelectCourses. I want to insert
    the selected item from those two multiple select lists into Training_Record table.
    Note, SelectEmployees" is from Employee table and SelectCourses is from Courses table. Those two table has no intersetion.
    Train_Record is the table that joins those two together.
    Please advice and your help is appreciate.

    Thank you for your help.
    I tried your code and changed the table/field name to my actual table/field name and the iitem name to actual item name.
    declare
    cursor c_Employees is
    select PERSONNEL_NEW.EMPLOYEEID from PERSONNEL_NEW where PERSONNEL_NEW.EMPLOYEEID in (:P15_SELECTEDEMP);
    cursor c_Courses is
    select COURSES.COURSE_ID from COURSES where COURSES.COURSE_ID in
    (:P15_SELECTEDCOUR);
    begin
    foreach :=r_employee in c_Employees loop
    foreach :=r_course in c_Courses loop
    insert
    into COPYOFTRAINREC ( EMPLOYEEID, COURSEID )
    values ( r_employee.EMPLOYEEID, r_course.COURSE_ID );
    end loop;
    end loop;
    end;
    I got error message as :
    ORA-06550: line 12, column 25: PLS-00103: Encountered the symbol "C_EMPLOYEES" when expecting one of the following: (
    Error
    OK

  • Load into single target table frm multiple source table in single interfac

    Hi
    I have four source table and a single target table.
    I need to move data from either of these tables into a target table , and we have to decide the source table based on user input.
    Example :
    Lets say there are four tables A,B,C,D and one target table T.
    If user input says A
    then the data from table A will move to table T
    And again , if the user says table C then data from table C will move to table T.
    And we have to create only one interface for achieving this in oracle Data Integrator ( ODI ).
    You can take assumptions in source and target table.

    Hi ,
    In ODI 11g , there are new feature callled dataset. It allows to use UNION , MINUS etc.
    Google it , you will get many tutorials on Dataset. check the link
    http://www.rittmanmead.com/2011/06/odi-11g-new-mapping-and-interface-features-part-1/
    In your case , you can provide filter conditions on your tables i.e.
    Say My target table is EMPLOYEE , My source tables are EMPLOYEE and DEPARTMENT
    INSERT INTO EMPLOYEE(CUSTOMER_ID , CUSTOMER_NAME) SELECT CUSTOMER_ID , CUSTOMER_NAME from employee where 'EMPLOYEE' = :EMP
    UNION DEPARTMENT_ID , DEPARTMENT_NAME from departments where 'DEPARTMENT' = :EMP ;
    Just pasted the Screenshots on following page : http://oracoholic.blogspot.in/ . Have a look
    Edited by: user8427112 on Jan 8, 2013 11:04 AM

  • How to compare two internal table and store value in third table

    Dear All,
                  There is two tabel say I_T1 & T2, in I_T1 there are 4 rows , in T2 there are multiple rows against the same field. Say there is a filed X common in both table .
    Value of I_T1-X are
    10
    20
    50
    90
    and value ot T2-X are
    10
    15
    20
    30
    40
    50
    .100
    Now i want to fetch data form T2 against the common field of I_T1-X and store into other internal table.
    Plz suggest me the proper way of doing this.
    Rewards points assured for proper answer.
    Regards,
    Gulrez Alam

    hi this is like your requirement.
    in this i am storing the values into the final table
    REPORT  ZZZZ000000.
    tables:mara,marc,mard,makt.
    data:begin of it_mara occurs 0,
         matnr like mara-matnr,
         mtart like mara-mtart,
         meins like mara-meins,
         end of it_mara.
    data:begin of it_marc occurs 0,
         matnr like marc-matnr,
         pstat like marc-pstat,
         werks like marc-werks,
         end of it_marc.
    data:begin of it_mard occurs 0,
         werks like mard-werks,
         lgort like mard-lgort,
         labst like mard-labst,
         end of it_mard.
    data:begin of it_final occurs 0,
         matnr like mara-matnr,
         mtart like mara-mtart,
         meins like mara-meins,
         pstat like marc-pstat,
         werks like marc-werks,
         lgort like mard-lgort,
         labst like mard-labst,
         maktx like makt-maktx,
         end of it_final.
    select-options:s_matnr for mara-matnr.
    select  matnr
            mtart
            meins
            from mara
            into table it_mara
            where matnr in s_matnr.
            if not it_mara[] is initial.
            select matnr
                   pstat
                   werks
                   from marc
                   into table it_marc
                   for all entries in it_mara
                   where matnr = it_mara-matnr.
                   if not it_marc[] is initial.
                   select werks
                          lgort
                          labst
                          from mard
                          into table it_mard
                          for all entries in it_marc
                          where werks = it_marc-werks.
                   endif.
          endif.
    loop at it_mara.
    it_final-matnr = it_mara-matnr.
    it_final-mtart = it_mara-mtart.
    it_final-meins = it_mara-meins.
    read table it_marc with key matnr = it_mara-matnr.
    it_final-werks = it_marc-werks.
    it_final-pstat = it_marc-pstat.
    read table it_mard with key werks = it_marc-werks.
    it_final-lgort = it_mard-lgort.
    it_final-labst = it_mard-labst.
    if sy-subrc = 0.
    select maktx from makt into it_final-maktx where matnr = it_final-matnr.
    endselect.
    endif.
    append it_final.
    endloop.
    loop at it_final.
    write:/ it_final-matnr under 'material',
            it_final-mtart under 'material type',
            it_final-meins under 'unit of measure',
            it_final-werks under 'plant' ,
            it_final-pstat under 'status',
            it_final-lgort under 'storage loc',
            it_final-labst under 'stock',
            it_final-maktx.
    endloop.
    reward points if useful,
    venkat.

  • Loading MS Access Table and Data into Oracle

    Hi,
    I have few tables in MS Access. I want to create same layout of tables in Oracle and want to populate data from MS Access tables to Oracle tables.
    Please let me know if there is a way by which I can create tables and load data automatically (thru some option or script)?
    I have Oracle 10g database and its clients.
    Thanks in advance,
    Rajeev.

    You can use Oracle migration workbench
    Loading MS Access Table and Data into Oracle
    It´s very easy to use and good to import
    regards,
    Felipe

  • Data from a file need to be read and mapped  into a custom table of R/3

    Hello all,
    This is related to inbound to  SAP ECC via SAP PI.
    There is a requirement concerning PI part that data from a file need to be read and mapped  into a custom table of R/3.
    To have this scenario developed , do we have any other  option than the Proxy ?
    My understanding is as follows : File --> SAP PI --> Proxy
    You suggestions are welcome.
    Regards,
    Rachana

    Hi Ravi,
    As suggested by Inaki, you can use proxy communication in recever.
    but you can also use the below
    FILE -----> PI -------> PROXY
                                  RFC
                                  IDOC
    to communicate to ECC system.
    Regards
    srinivas

  • Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?

    Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?

    Are you using the Word Report Generation instrument? You can find it in toolslib\activex\word\wordreport.fp under the CVI directory.
    The instrument comes with a sample project that shows how to include table and graphs in a Word document: see samples\activex\word\wordrpt.cws in the samples foder of your CVI installation.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to retrieve data from catsdb table and convert into xml using BAPI

    How to retrieve data from catsdb table and convert into xml using BAPI
    Points will be rewarded,
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • How do I make Merge operation into the target table case insensitive?

    Hi All,
    We have a target table that has a varchar 2 column called nat_key and a map that copies over data from a source table into the target table.
    Based on wheteher the values in the nat_key column matches between the source and the target, an update or an insert has to be done into the target table.
    Let us say target table T has the following row
    nat_key
    EQUIPMENT
    Now, my source table has the same in a different case
    nat_key
    equipment
    I want these rows to be merged .
    In the OWB map, I have given the property of nat_key column in the target table as 'Match while updating' = 'Yes'. Is there a built in feature in OWB, using which I can make this match as case insensitive?
    Basically, I want to make OWB generate my mapping code as
    if UPPER(target. nat_key)=upper(source.nat_key) then update...else insert.
    Note: There is a workaround with 'Alter Session set nls_sort=binary_ci and nls_comp=linguistic', but this involves calling a pre-mapping operator to set these session parameters.
    Could anyone tell me if there is a simpler way?

    Hi,
    use an expression operator to get nat_key in upper case. Then use this value for the MERGE. Then nat_key will only be stored in upper case in your target table.
    If you have historic data in the target table you have to update nat_key to upper case. This has to be done only once and is not necessary if you start with an empty target table.
    Regards,
    Carsten.

Maybe you are looking for

  • Sales Order Free item and Credit Limit Checking

    Hiii Guys, need your help, How to release Sales Order free item when credit limit exceeded ? Here some info : Customer : ABC Credit limit : 50,000.00 Credit Exposure : 52,000.00 Risk Category : 003 High Risk My user want to create sales order for fre

  • Issues with Nested Tables and Adobe Designer

    Hi, I have some strange issues when I am trying to create a nested dynamic table with SAP DATA in Adobe Designer. My Outer Table has article items and in this table I got a nested charges. For instance the table contains this data: DATA |->Article1 |

  • Missing bridge startup scripts

    In bridge CS4 I am trying to use the Output feature to create a PDF contact sheet. However, when I click on that, I get a new workspace but I get no features in the output panel, it's blank. In reading the bridge PDF help manual, it says that one sho

  • Muse web banners

    I have created web banners in after effects, exported the swf file and placed them in a Muse site I am building. When I try to upload to my ftp it will not load. I am thinking that my banners are just too large of files. What should I do? I don't kno

  • How do I submit a IPod Nano Model idea to Apple?

    How do I submit an idea of an iPod Nano Model?