How to join multiple source tables and do lookup?

I have a requirement to load a target table by joining 4 source tables. Also I have to do a lookup on a domain table to transform codes and check for nulls. What will be the best approach to load the target table?
Is it possible to do it in one interface or do I need to build multiple interfaces to achive this?
My source and target database both are oracle and I am planing to use Oracle Incremental Update Merge.
Thank you

You are in the right direction by creating one interface for this transformation.
You will need to drag drop 4 source tables + the lookup table on the Sources window of Interface and then make appropriate joins.
Also, check for NULLS in the transformation. Depends what you want to do with the NULLS. If you want to ignore them, use a filter.
If you want them to error out, use a constraint.
If you want to convert them, use NVL
Start with Oracle Incremental Update and once successful, use Oracle Incremental Update MERGE.

Similar Messages

  • Join multiple fact tables and dimensions and use all tables in report issue

    Hi,
    I have a report requirements and need to use multiple fact tables and unconformed dimensions as described below
    Fact table: F1,F2,F3
    Dimensions tables: D1.....D9
    F1:(joined to) D1,D2,D3,D4
    F2::(joined to)D1,D2,D5,D6
    F3::(joined to)D1,D2,D7,D8
    D7::(joined to)D9,D8 (dimension D7 joined to two other dimensions D9 and D8
    I'm trying to use columns from almost all the fact and dimension tables but getting "Unable to navigate requested expression. Please fix the metadata consistency warnings."
    Repository is consistent and no errors and warnings.
    How can I configure the repository to develop reports using all fact tables and dimensions?
    Appreciate for your help.
    Thanks
    Jay.
    Edited by: Jay on Feb 9, 2012 4:14 PM

    So you want me to convert snowflake schema to star. does it solve my problem? individual star queries are working find but when I query multiple stars together getting inconsistency errors. I removed content tables dim level totals for unconformed dimensions in logical fact LTS and set level for measures at total level for unconformed dimensions. it is still in progress and need to test.
    Thanks
    Jay.

  • 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

  • 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

  • How to combine multiple fact tables and dimensions in one worksheet?

    Hello Forum,
    I am encountering a reporting problem when trying to create a worksheet that uses more than one cube/fact table and common dimensions. I have used Oracle Warehouse Builder 10Gr2 to design and deploy a pretty simple ROLAP data mart. We are using Discoverer Plus for OLAP as our reporting tool. We have 5 dimension tables using a star schema and 3 fact tables, when I create the worksheet I bring in our sales measure from our sales item table and then Store_Name from my Stores Dimension and then day from my time dimension, everything looks good at the stage, we're just trying to get a sum of all sales for that store on that day. Then I bring in a measure from our advertising cost table and a join window pops up asking which join to use, if I choose either the Store or the Time dimension I get correct data for the first fact table (sales) and grossly incorrect data for the ad cost measure from the second fact table (advertsing costs)...... any help would be appreciated

    You have encountered one of the key limitations of Discoverer... which I complained about to the Discoverer product manager at OpenWorld in 2001....
    Anyhow, to get around this, you are going to have to deal with it either in the database, (views, materialized views, tables), or within the admin tool by creating a custom folder.
    Discoverer also calls this the "fan trap", but never really had a solution to the problem. [The solution only worked is you joined to one and only one dimension!]
    What you want (using Sales_Fact and Inventory_Fact as an example) is to join Sales to Time, Store, and Product, and save that result. Then join Inventory to Time, Store, and Product, save that result, then do a double outer join between the two intermediate temporary tables in order to calculate something useful like inventory turns by store and product line.
    This is also known a "multipass SQL", and is supported by some (but not many) other tools.
    So, to accomplish this with Discoverer, you'll either need to create a view, or table, or materialized view that has already put Sales and Inventory into a single (virtual?) fact table. Alternatively you can write the SQL for how to do this linkage (don't forget to handle missing data), and use the Discoverer admin tool to create a custom folder that uses your SQL.
    Hope this helps!

  • How to populate the main table and the lookup's at the same time

    Hi ,
       What I have with me is the XML files which contain the data from the material master and the excel sheet which talks about the mapping . it basically tells me which field of the main table maps to which field of which segment in the IDOC and also the name of the table and the field in the R3 system .
    I wish to use this info to populate the data in the material repository .
    - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    - Can I use the standard maps available for import in the business content of material repository in MDM ?
    - If the answer to the second question is NO then I think i can create the maps and save them for future use .
    Regards
    Deepak Singh

    Hi, Deepak
    >>> - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    I don't think you can populate both main table and all fields of lookup tables at the same time, i.e. using same map. You can consider 2 options to upload all information you have:
    1) If your XML file contains data you would like to upload to lookup tables, you can upload it to MDM lookup tables with several maps using same XML and choosing different sections of that XML corresponding to different MDM lookup tables.
    2) Also you can upload main table simultaneously with lookup table entries (using same map), but in this case new lookup table entries will only contain display field values that you mapped. To do this you should use 'Add' value mapping functionality for fields that you mapped to lookup tables.
    >>>- Can I use the standard maps available for import in the business content of material repository in MDM ?
    1) In case you have material master repository delivered by SAP and you use XML files which structure corresponds to SAP predelivered XSD schemas then you can use these maps undoubtedly.
    2) If your repository is based on SAP predelivered, but you changed it ,you should adjust these maps due to differences in repository structure and  XML files structure.
    3) If you created your repository from scratch you should consider option of making your own import maps.
    Regards,
    Vadim Kalabin

  • How to provide joins between oracle tables and sql server tables

    Hi,
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server.
    how to provide joins between oracle tables and sql server tables ? Any help on this
    Regards,
    Malli

    user10675696 wrote:
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server. Bad idea most times. Heterogeneous joins do not exactly scale and performance can be severely degraded by network speed and b/w availability. And there is nothing you can do in the application and database layers to address performance issue at the network level in this case - your code's performance is simply at the mercy of network performance. With a single glaring fact - network performance is continually degrading. All the time. Always. Until it is upgraded. When the performance degradation starts all over again.
    If the tables are not small (few 1000 rows each) and row volumes static, I would not consider doing a heterogeneous join. Instead I would rather go for a materialised view on the Oracle side, use a proper table and index structure, and do a local database join.

  • Merge multiple source table dates and to one target table

    The requirement is to merge multiple source tables (each table has a set of start and end date) to one target table with one set of start and end date and contain the date relevant column values from each source table.  Payment source tablestart dateend datepayemnt1/1/201512/31/2015301/1/201612/31/999960Position source tablestart dateend dateposition1/1/201512/31/2016101/1/201712/31/999920Target tablestart dateend datepayemntposition1/1/201512/31/201530101/1/201612/31/201660101/1/201712/31/99996020 What transformation(s) will be best to use to handle this requirement? Thanks, Lei

    Thanks Karen,
    that was exactly what i was hoping for.
    Maybe it could be made easier/less confusing if the Mapping Workbench just made you choose a target table. But maybe this is not usefull if the table contains two foreign keys to the same table. Or maybe this should just be put somewhere in the documentation.
    Regards,
    Robert
    Hi Donald,
    fortunately i'm my own DBA so i don't have any problems ;-). However i'm certainly interested in the reasons for not having such a conditional foreign key.
    However actually the foreign key isn't conditional, the condition is that either the field (using the FK) must be filled, or a free-format field. The reasoning for this is that we have a list of known towns and if the addres is local a town from that list must be chosen. If the addres is outside the country a town can just be typed in (no list).
    Concerning the agrregate, all fields are always used. There are no neediness flags anywhere. The aggregate contains three fields which are mapping as direct (two fields) or a One-to-one (the FK). All 'parents' all contains these three fields.
    Regards,
    Robert

  • Best approach to join multiple statistics tables into one

    I have read different approaches to join multiple statistics tables into one, they all have a column "productobjectid".
    I want to get all data for each product and put it to excel and output a jpg statistic with cfchart.
    How would you do this, the sql part?
    Thanks.

    A couple suggestions:
    1) when joining tables, its best to list both table/fields that you are joining in the FROM clause:
    FROM shopproductbehaviour_views INNER JOIN shopproductbehaviour_sails ON shopproductbehaviour_views.productobjectid = shopproductbehaviour_sails.productobjectid
    2) You add tables to a SQL join by placing another join statement after the SQL above:
    SELECT *
    FROM TableA INNER JOIN TableB on TableA.myField = TableB.myField
    INNER JOIN TableC on TableA.anotherField = TableC.anotherField
    3) If you have columns in the tables that are named the same, you can use column aliases to change the way they appear in your record set:
    SELECT TableA.datetimecreated 'tablea_create_date', TableB.datetimecreated 'tableb_create_date'
    4) Certainly not a requirement, but you might want to look into using <cfqueryparam> in your where clause:
    WHERE shopproductbehaviour_sails.productobjectid = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#all.productobjectid#">
     You might want to consider checking out one of the many tutorials on SQL available online.  Many of the questions you posed in your post are covered in pretty much every basic SQL tutorial.  Alternately, a good SQL book is worth its weight in gold for a beginning web applications developer.

  • Prcedure to joining of two tables and pls explore the primary & foriegn key

    Dear All,
    Am new to this forum looking forward to have some discussions and guidance reg ABAP.
    <b>My query is</b>
    what is the prcedure to joining of two tables and pls explore the primary & foriegn key relationships.
    Your kind help is required in this query .
    Thanks n regards
    Carol P

    Hi Carol,
    Joining two tables fetch data from tables that has relevent entry based on the keys. like LIKP and LIPS these are delivery tables. if the business requirement is fetching delivery data that are exists in both two tables. here LIKP will conatins a single entry against a condition and LIPS may contains several entry because one delivery may has multiple line items. so, fetch the data joining the two tables on vbeln that is delivrey number. this is used to increase the performance of the program except for all entries.
    Foreign key is poiting twowards primary key; it may be 1:1 , 1:many and many:many. if field1 of table a is pointing towards field1 of table b. then based on these condition at the time of entry SAP will check how many entry can be entred in field1 of table a.
    regards
    Krishnendu

  • Loading to target table from multiple source table

    Hi forum,
    I have some doubts regarding selecting data by joining 2 or 3 tables and populate the target table in same schema(ora 10g).The way i need to load is first extract the data and do some some transformations(like derive new value based on existing column value ,eg: arithmetic operations) and then load data to target table in same schema...
    GIve me a suggestion to do the same in best possible way..since the entire activity to be finished in 3 hrs and volume in each table is 377 million , 122 million and 120 million.
    Thanks ,
    Aneesh A

    It is Rob who spend his freetime in answering you - not "bob".
    > Can u explain me the time-lines for the mentioned volume...?
    You mean "you" and not "u"? This is not a MXIT forum where IM SPEAK is the norm.
    As for time-lines.. it is silly to expect anyone to give you estimated run times when the hardware platform, types of disks, o/s configuration, Oracle configuration, average loads and so on are unknown.
    What Rob showed you is the most optimal way to write SQL to transform data from one or more source tables and insert these results into a destination table - using direct path inserts and parallel query. The only faster method would be a CTAS - Create Table As Select as oppose to an Insert Table with select.

  • Multiple routing tables and/or policy routing

    Hey all,
    I'm trying to configure a Mac Mini (10.8) for multiple routing tables and policy routing.  This server runs Ostinato, a freeware traffic generator.  My purpose is to generate traffic on multiple VLANs towards different gateways and different destinations.  To that end, I have VLAN tagged the (only) Ethernet port and configured 5 VLANs on it.  The first one has the default route (I manage this Mac over this VLAN).  The other four have IP addresses in the test range I'm using. 
    The goal is to have traffic sourced from IP-address-X go out vlanX towards gateway-X.  It's counterpart on the far end runs Linux and I have configured it in this way:
    ip route add default via <gateway-X> dev ethX table X
    ip rule add from <network-X> table X priority X
    Researching on OpenBSD forums (since it's the base of MacOS X), provided this:
    route -T X add 0.0.0.0/0 -iface <gateway-X>
    echo pass in from <network-X> to 0.0.0.0/0 rtable X | pfctl -mf -
    However, the Mountain Lion "route" command does not support the -T option, so that killed that idea.  Another forum suggested that this would have worked on 10.4:
    ipfw add X fwd <gateway-X> ip from <IP-address-X> to any
    I tried this on 10.8 though the man page says it's deprecated, and (surprise, surprise) it did not work. 
    Any ideas to get this working appreciated!
    Thanks,
    Aaron

    Still doesn't have it in 10.9.4.
    irene:~ cschwartz$ sudo bash
    bash-3.2# route -T add
    route: illegal option -- T
    usage: route [-dnqtv] command [[modifiers] args]
    I'm guessing you want policy-based routing due to VLANs...? If you can get a USB-to-Ethernet adapter, then maybe you can work around this by using multiple physical links instead of VLAN tagging. But if you need source-based routing etc. then no.

  • How to join THREE different tables into internal table using one select statement .

    How to join THREE different tables into internal table using one select statement .
    Hi experts,
    I would like to request your guidance in solving the problem of joining the data from three different database tables into one internal table
    Scenario:
    Database tables:
    SPFLI
    SFLIGHT
    SBOOK.
    Table Fields:
    SPFLI - CARRID CONNID COUNTRYFR CITYFRM COUNTRYTO CITYTO
    SFLIGHT - CARRID CONNID FLDATE SEATSMAX SEATSOCC SEATSMAX_C
    SEATSOCC_C SEATSMAX_F SEATSOCC_F
    SBOOK - CARRID CONNID CLASS
    MY INTERNAL TABLE IS IT_XX.
    Your help much appreciated.
    Thanks in advance.
    Pawan.

    Hi Pawan,
    please check below codes. hope it can help you.
    TYPES: BEGIN OF ty_xx,
            carrid     TYPE spfli-carrid   ,
            connid     TYPE spfli-connid   ,
            countryfr  TYPE spfli-countryfr,
            cityfrom   TYPE spfli-cityfrom  ,
            countryto  TYPE spfli-countryto,
            cityto     TYPE spfli-cityto   ,
            fldate     TYPE sflight-fldate ,
            seatsmax   TYPE sflight-seatsmax ,
            seatsocc   TYPE sflight-seatsocc ,
            seatsmax_b TYPE sflight-seatsmax_b,
            seatsocc_b TYPE sflight-seatsocc_b,
            seatsmax_f TYPE sflight-seatsmax_f,
            seatsocc_f TYPE sflight-seatsocc_f,
            class      TYPE sbook-class,
          END OF ty_xx,
          t_xx TYPE STANDARD TABLE OF ty_xx.
    DATA: it_xx TYPE t_xx.
    SELECT spfli~carrid
           spfli~connid
           spfli~countryfr
           spfli~cityfrom
           spfli~countryto
           spfli~cityto
           sflight~fldate
           sflight~seatsmax
           sflight~seatsocc
           sflight~seatsmax_b
           sflight~seatsocc_b
           sflight~seatsmax_f
           sflight~seatsocc_f
           sbook~class
      INTO TABLE it_xx
      FROM spfli INNER JOIN sflight
      ON spfli~carrid = sflight~carrid
      AND spfli~connid = sflight~connid
      INNER JOIN sbook
      ON spfli~carrid = sbook~carrid
      AND spfli~connid = sbook~connid.
    Thanks,
    Yawa

  • Parse SQL query and extract source tables and columns

    Hello,
    I have a set of SQL queries and I have to extract the source tables and columns from them.
    For example:
    Let's imagine that we have two tables
    CREATE TABLE T1 (col1 number, col2 number, col3 number)
    CREATE TABLE T2 (col1 number, col2 number, col3 number)
    We have the following query:
    SELECT
    T1.col1,
    T1.col2 + T1.col3 as field2
    FROM T1 INNER JOIN T2 ON T1.col2=T2.col2
    WHERE T2.col1 = 1
    So, as a result I would like to have:
    Order Table Column
    1 T1 col1
    2 T1 col2
    2 T1 col3
    Optionally, I would like to have a list of all dependency columns (columns used in "ON", "WHERE" and "GROUP BY" clauses:
    Table Column
    T1 col2
    T2 col1
    T2 col2
    I have tried different approaches but without any success. Any help is appreciated. Thank you in advance.
    Best regards,
    Beroetz

    I have a set of SQL queries and I have to extract the source tables and columns from them. In a recent db version you can use Re: sql injection question for this.

  • How to find the Source Table in one corresponding schema?

    Hi All,
    How to find the Source Table in one corresponding schema?
    regards,
    DB

    DB wrote:
    Hi All,
    How to find the Source Table in one corresponding schema?
    regards,
    DBHUH?
    I do not understand your question
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

Maybe you are looking for

  • Stop the carousel from moving

    I've added navigation buttons to this carousel of items that will move the carousel either left or right, however I would like the carousel to STOP anytime an icon is at the center X point. When a nav button is pressed, the carousel moves until the n

  • Since Jan 1st cannot sync google calendar and iPhone calendar

    I had google calendars syncing just fine between iCal on my laptop and iPhone by using Exchange on my iphone. Since the first of the year I can't get one of the calendars to sync. I have a work calendar and personal calendar as well as two shared cal

  • BizTalk TechNet Gurus Announced for June 2014!

    The Results are in! and the winners of the TechNet Guru Competition June 2014 have been posted on the Wiki Ninjas Blog. Below is a summary, heavily trimmed to fit the size restrictions of forum posting.  BizTalk Technical Guru - June 2014   Steef-Jan

  • Issue with JSTL ( c:import ) tags in Weblogic 9.2

    Hi, I'm trying to migrate a struts (1.2.9) application from Weblogic 8.1 to Weblogic 9.2. This application has JSPs with JSTL (1.0) tags. I have a JSP page that has multiple (around 7) c:import statements. When I launch my application, only the conte

  • Some texts being sent as SMS instead of iMessage

    Some of my texts are being sent as SMS (green) instead of iMessages (blue) even though I know these people have iPhones.  It's only certain people it happens to as I have other friends who have iPhones and messages are being sent as iMessages like th