ODI Join

Hi,
I am trying to model the following query in ODI 12c;
select tarih, h.organization_id, sum(calisan_sayisi) calisan_sayisi
from hr_all_organization_units h
left join ( select tarih, paa.organization_id ,count(*) calisan_sayisi
            from per_all_assignments_f paa
            join per_all_people_f pap on pap.person_id= paa.person_id and pap.employee_number not like 'x%'
            join per_person_type_usages_f pu on pu.person_id = pap.person_id
            join per_person_types pt on pu.person_type_id = pt.person_type_id and pt.user_person_type in ('Employee')
            join (select trunc(sysdate) -level tarih from dual connect by level <= 100) t on    t.tarih between nvl(paa.effective_start_date, t.tarih) and nvl(paa.effective_end_date, t.tarih)
                                                                                            and t.tarih between nvl(pu.effective_start_date, t.tarih) and nvl(pu.effective_end_date, t.tarih)
                                                                                            and t.tarih between nvl(pap.effective_start_date, t.tarih) and nvl(pap.effective_end_date, t.tarih)
            where paa.primary_flag = 'Y'
            group by tarih, paa.organization_id) calisan on calisan.organization_id = h.organization_id
where h.type = 'MAĞAZA'
group by tarih, h.organization_id;
I need to join all the result of the left join part to 'hr_all_organization_units' table. However, I do not know how to diffirentiate the source tables. How can I accomplist this? Can you please help me?
Thank You

Why I can not add a screenshot to my post Here is what I've done;
    1- I created a reusable mapping;
It includes the inner left join tables (which are paa, pap, pu, pt and dual table in a dataset)
Then put an aggregate to group by according to tarih and paa.organization_id (I put the aggregate outside the dataset)
    2- I created a regular mapping;
When I create a new mapping, it comes with a default source area. In that case;
I put my hr_all_organization_units table in it
Then, I drag the created reusable mapping in the target area (because ODI does not allow to put it source area as you say)
Then, I drag a join component again in the target area
Then, try to connect default source area and reusable mapping. The result;
I can connect default source area to join component (when I drag, a line appears between two)
However, I can not connect it to reusable mapping (reusable mapping and join component does not work!) I really do not understand. Reusable mapping seems as a table but it does not have any columns in it.
Thank you

Similar Messages

  • ODI Join error

    Hi ,
    I have facing problem in the below scenario
    A,B,C are 3 tables
    A is the master table
    A joins B and B joins C every thing mapped correctly.
    when i try to execute this in ODI its gives below error
    "com.sunopsis.tools.core.exception.SnpsSimpleMessageException: The source datatype is null for the column: EMPLOYER, and the technology: Oracle"
    when i remove B to C join and add another condition in A to B Join
    ( ie and B.XXX in (Select C.XXX from C)
    then it works fine.
    Can anyone help how to solve this using 1st one.
    Thanks in Advance,
    Aravind

    A,B,C are my source tables
    D is my target table
    A joins to B and B joins to C
    my source and target is in the same database.
    KM's i am using are
    source : LKM SQL to Oracle
    target : IKM Oracle Incremental Update.
    A is the master table and B is the child table and C is the sub child table.
    I want to load a column from C table into target D based on the join condition B to C.
    when i do this it doesn't show any error in the mapping but when i execute it gives
    "com.sunopsis.tools.core.exception.SnpsSimpleMessageException: The source datatype is null for the column: EMPLOYER, and the technology: Oracle" error.

  • Can we replicate Informatica Lookup transformation in ODI Interface?

    So was just wondering if we could replicate a lookup transformation in an ODI join of some sort where in only one value is returned for multiple matches of the same item....something like a max for a group or something while joining 2 tables...
    So for example I have 2 tables...A columns (Attendee_id,xyx,byx)
    B columns (partnerid,attendee_id,xyz,bxc)
    I want to join table A and B on Attendee_id and get the partner_id---but I want only one record in case of multiple matches for a particular attendee_id
    can we do this??

    No responses yet...Ive tried doing a left outer join...but it still returns all the matches...I want to return only one record....ne help from the xperts?

  • Standalone lookup - How to join in ODI - SQL Server

    Hi All,
    My Sql server query is joining as follows
    Select ...................
    From A.DBO.MAIN
    Inner Join A.DBO.LOOKUP_STANDALONE on 1=1
    How will I convert this in ODI?
    Thank you for the time and help.

    Hello,
    I think that what you want to do is a cartesian join (join all rows from MAIN with all rows from LOOKUP_STANDALONE).
    You can do that in ODI by drag one random column from MAIN onto one column of LOOKUP_STANDALONE (no matter which columns). Then click on your join et select the "Cross" Checkbox.
    Hope it helps,
    JeromeFr

  • Diff b/w lookup and join in odi

    Hi friends,
    I am new to ODI ,
                   Please can anyone explain the difference between "join" and "lookup" ?
    Thanks in advance !
    Cnu

    Hi,
    Have a look
    https://forums.oracle.com/thread/2470379
    Thanks

  • Join multiple tables in odi interface

    Hi All,
    I am new member to Oracle to Data integrator. This is a simple question but i haven't figure out.
    I have four source tables and i need to apply joins (left, right and inner)between the table s and use some operators like(and,or) but i am unable to find the this option in odi. I have written a query in SQL Developer and executed it is working fine but when i paste the query in ODI it is showing Missing Expression error.
    Thanks for your help,
    Madhava

    Hi - If you have your four source tables in your interface source your neally there, just drag a column from one table to another to create a join (any columns will do) - Then change the join properties to specify the colum = column and the join type, simple as that.
    You can build your operators either into the joins (e.g AND) or you can create a filter on that column for any predicate , just drag that column from the table onto the canvas to create the filter object, then change the properties of the filter to suit your needs.
    Out of interest - Where are you pasting the query into ODI?

  • How to use multiple outer join in ODI

    SELECT
    Count(*)
    FROM
    student S,
    department D,
    course C
    WHERE
    D.S_Name=S.S_Name
    AND D.Dept_Name = C.Dept_Name (+)
    and S.C_Name =C.C_Name (+)
    And (D.Dept_ID = 1);
    I run this query. I got an ORA-01417 error.

    In topology change the join option to Ordered ISO
    then rewrite your query with ANSI syntax.
    SELECT
    Count(*)
    FROM
    student S join department D on D.S_Name=S.S_Name,
    student S right outer join course C on S.C_Name =C.C_Name,
    department D right outer join course C on S.C_Name =C.C_Name
    where
    (D.Dept_ID = 1);
    First verify the code in sql client befor implementing it in ODI
    Thanks,
    Sutirtha

  • Problem on Join in ODI

    Hi,
    I'm working on a migration case as follows:
    I have 1 source table, 1 reference table and 1 target table (All are in ORACLE). While the interface execution, the source will join the reference to get the UID from the reference table (FK to the target table) and put into the target. As the result, some source data is not migrated due to the join. Since that's not an error to constraint, thsoe 'not joined' data will not be able to fall into the E$ table. How ODI tell which data is not migrated from teh source?
    Remarks: the target field is not an not null field.
    Thanks a lot!!
    Tao

    ODI didn't say nothing about which data is not migrated.
    If you have selected CKM options in order to retrieve in the E$ table records with inconsistant null FK you could pass your join in Outer mode instead of Inner.
    All the null value retrieve by the query (in your source table but not in the reference one) will be send to the E$ table.
    If all your source table are in ORACLE, if I were you I would extract the SQL code from the Operator (at LKM or IKM time) to execute it on a query tool.
    You will see which records are forgotten.
    hope to help
    Brice

  • Implement MAX / JOIN in ODI 10g?

    What is the approach for using MAX functions in ODI 10g? I need it to filter source data:
    SELECT SRC_TAB.*       
    FROM SRC_TAB
    INNER JOIN
    (SELECT MAX(COL1) COL1, COL2  FROM SRC_TAB GROUP BY COL2) B
    ON SRC_TAB.COL1=B.COL1 AND SRC_TAB.COL2 = B.COL2
    Luckily this issue has been addressed in ODI 11g.
    Thank you.

    That's not good especially when you have large volume of data.
    In this case, in 10g it's better to rely on a underline view rather than 2 interfaces.

  • Left outer join in ODI

    I am trying to do left outer join in ODI for the source tables in SQLserver.
    I have created a join between 2 columns and made it left outer join by checking the box in join properties.
    It is not working as expected. In the query it just does T1.Col1=T2.col1 and makes it as equi join.
    Any suggestions?
    Thanks

    I have the same problem..
    For example:
    Interface:
    SOURCE: tbl_employee, tbl_positions
    TARGET: tbl_persons
    In ANSI SQL it would be:
    INSERT INTO tbl_persons (..., position_name)
    select ..., tbl_positions.name from tbl_employee left join tbl_positions on tbl_employee.pos_id = tbl_positions.id
    But when I execute Interface, inserted data as JOIN, didn't inserted "NULL" in position_name.
    "LEFT JOIN" is in Interface's script...
    How decide this problem?

  • ODI-15605: Multiple ordered joins in this dataset use the same order number.

    I get this error but only have 3 ordered joins numbered 10, 25 and 30; I also have ten lookups specified as left-outer joins.
    I presume the lookup joins also have order numbers. Does anyone know how to find out those order numbers?
    (For the moment I'm using a work-around of doing the lookups in the staging area, which seems to avoid the problem.)
    ODI version: 11.1.1, Build ODI_11.1.1.5.0_GENERIC_110422.1001
    Java: 1.6.0_45
    Windows: 7 Pro SP 1, 64-bit
    Keith H.

    Forgot to mention, I get this error when I save the interface, not when I run it. K

  • Regarding logical joining of two table  by using ODI interface

    I have a two table in database.i have to logically add them, with the help of ODI interface.which should reflect in target.
    there is a smple cinario regarding ,convertion of relational table to flat file.
    but how to reflect mutiple table through joining in target from source.

    Hi
    Please correct my understan on your query
    You want to say that, you have two tables at source side and want to store data to target table, later from target to flat file
    or
    You have two target table want to store data into flat file
    Thanks
    Phani

  • Join in odi

    Hello gurus...
    I am a beginner in ODI 11g.
    How can i use join operator for transform data from two different tables to target table in ODI.
    plz give an example with picture or video..
    plz help.
    soumya.

    Hi Sowmya,
    Below video link may helps you
    http://www.youtube.com/watch?v=zH_MMe7YWbw
    Regars,
    Phanikanth

  • Outer join issue in ODI

    Hello Everyone,
    I have two tables : A (col1, col2, col3) and B (col1, col2, col3) in two databases. My objective is to do a left outer join between these tables, apply an additional filtering criteria using a where clause, and finally populate the result set into a target data store. In essence this is what I want to achieve,
    SELECT * FROM A x, B y
    WHERE
    x.col1 = y.col1(+) AND
    x.col2 = y.col2(+) AND
    x.col1 IN (SELECT col1 FROM B)
    So, in the designer to fulfill the first two conditions I specify the join as left outer join. Then I add the third condition. When I run the interface I observe that the tool inserts a "+" right next to the select in the third condition. Thus the query looks like this,
    x.col1 = y.col1(+) AND
    x.col2 = y.col2(+) AND
    x.col1 IN (SELECT(+) col1 FROM B)
    This of course throws an error with the message that "+" cannot be used in the select list. Has anyone solved this problem before? Any help is greatly appreciated.
    Edited by: Sankash on Dec 8, 2008 4:00 AM
    Edited by: Sankash on Dec 8, 2008 9:26 AM

    Hi Nag,
    As you asked to reply to this query by email, let me try to contribute.
    The editor window is common to all "points" at ODI, it means that it will opens with the very same options in a column mapping, filter or step procedure.
    The set operator should be used respecting the limits of each object.
    About the query that is the correct behavior but, of course, do not work to subqueries.
    Just let the join as a simple one and write the plus signal directly at join code but not at filter code.
    This will works with one consequence. The symbol of the join between the tables will be showed with no left or right join information, but just visual.
    Does it help you?

  • ODI 12c: no automatic joins in mappings

    Hi,
    exploring the freshly installed ODI 12c I'm eager to learn, in which way the OWB mapping concept has been transferred to ODI. Most features appear familiar to me, it's very exciting for me as old OWB guy
    One think seems buggy to me: when dragging 2 tables connected by foreign key into the mapping I expect a join object created automatically but this doesn't happen. Why not?
    I didn't apply any patch.
    best regards
    Thomas

    Hi Thomas,
    You've got it right there - joins are only created for foreign keys when using a dataset. The idea is that datasets present more of an Entity Relationship type view of your data objects, rather than a purely flow based view. So when you drop your sources into a dataset, ODI helps by using the foreign keys to create joins. When you drop a source into the general flow mapping, ODI assumes that you know what you want to do with it, and allows you to create the joins manually.
    Datasets are good for more than backward compatibility. They can be really useful for defining "islands" of data in your mapping flow, which you can then collapse and consider as a single unit. For example, you may have several datasets that each join numerous tables together, but once you've defined the datasets, you can collapse them so that each just looks like a single object, making your mapping a lot simpler to work with.
    I'm afraid I don't know if there's a mapping tutorial, but I'll get back to you if I can find one.
    Nigel

Maybe you are looking for

  • Extract data into the Oracle Database

    Hello, I have file in PDF format. I need to extract data into the Oracle Database. what should be my action ? And how could I accomplish? thanks DN

  • MPEG-2 import in FCPX

    I apologize if I ask again a a frequent question but I doen't find the answer. A colleague provides me a HDV file in mpeg-2 format. But FCPX doesn't allow the import of this file in my event library. Does I really need to convert this file ? (which i

  • ESSBASE server - Connect Error 1042032:

    Hi All, I am having trouble connecting to Essbase Server on a new install i have done on a windows 2008 64 bit. The Installation went successful and I am able to start the essbase server from command prompt. From the Administration service Console, I

  • LV 2009 SP1 corrupts front panel VI during 'save' operation

    My best guess is that corruption happens during 'save' operation. Steps: 1. Slightly modify vi. 2. Run it, then stop and exit with saving of changes. (Saving takes unusual big amount time and cpu/memory resources) 3. Try to open vi and get the messag

  • Bringing photos in at a higher dpi

    I use Photoshop Elements 2.0 with a 6.2mp camera and the photos come into PSE at 180dpi and 11x17. I'm thinking about a new 8.5mp camera and shot some test shots. They came into PSE at 72dpi at 24x35. If I convert the photo to 300dpi it becomes a 4x6