Lookup Conditions

Hello.
I have a business requirement where I need to do currency conversions in ETL. We are a global organization. I'm working with two tables. One contains general ledger journal entry line data. This data has amounts recorded in one of 50+ local currencies. I have a second table that contains all historical currency conversion rates to be used to convert any local currency to one of three base currencies. The results should then be loaded into a fact table.
For example, Table A has a journal entry line recorded in Yen. I need to use the currency conversion rate table, Table B, to convert that to US Dollars, Danish Kroner, and Indian Rupee. Those three conversions are each then a column in my fact table. The journal entry has an effective date which represents the date the entry was posted and therefore the date to be used for currency conversion. Furthermore, each row in the currency conversion table has a start and end date that indicates the time period that the currency conversion was valid. These start and end dates are not necessarily the same, so I need to lookup the conversion based on the following:
Table_A.Local_Currency_Type = Table_B.Local_Currency_Type
and
Table_A.Effective_Date >= Table_B.Start_Date
and
Table_A.Effective Date <= Table_B.End_Date
The results should return the Base Currency Type and the conversion rate from local to one of the three base currencies, one each for USD, DKK and INR base currencies. So for every one row of input 3 rows should be found.
I'm using OWB 10.2.0.2.8 and see that I can't edit the lookup condition in the mapping editor.
So, two questions: 1. Does a newer version of OWB allow for editing the lookup condition? 2. Can any of you provide guidance on alternative solutions for this issue?
Thanks for your time.

Hi, Scott.
The only reason I considered the lookup was that I hadn't fully thought my design through. After a few more hours (ugh) I was able to redesign with a JOINER.
Thanks for the feedback.
Dan

Similar Messages

  • Lookup conditions in DB lookup Expression

    Hi,
    Please let me know how to define lookUp conditions in DB lookup Expression.
    I'm working on Netweaver ABAP stack 7.0
    Thank you,
    Anjani.
    Edited by: Anjani P on Dec 27, 2009 3:13 PM

    Hello Anjani,
    I assume you are using NetWeaver 7.00 not Netweaver7.01.  In Netweaver7.00  BRFplus has no UI available so you have to work with the APIs only. In IF_FDT_DB_LOOKUP interface there is a method SET_FIELD_CONDITIONS which has a field condition table as its input.  You may set the lookup condions using this method.
    If you are using NetWeaver 7.01 or 7.02 you may use the UI for the same.

  • Losing Lookup Condition after import

    For transferring a project from development to test (and later production) we're using metadata export/import.
    After import into the 'test repository' we noticed that in a mapping the Lookup Condition of several Key Lookups are missing, in fact these Key Lookups are all using the same Table definition.
    Has anyone experienced this problem?
    And, of course, is there a cure?
    We're using
    Warehouse Builder 9.0.3.37.0
    Repository 9.0.3.0.1
    Oracle db. 9.2.0.2.1
    Regards,
    Peter van Leeuwen

    We resolved this issue.
    The problem occurs when table names are long. The original table names was 27 characters long. In a mapping we have 3 lookups all based on the same table.
    We lost the lookup condition in 2 cases, that is project export/import (from Development to Test) and copy mapping.
    We solved the problem by shortening the table name.
    Peter

  • How to add new key lookup in Mapping ?

    Hi,
    I am learning OWB 10g from oracle.com site. I am following the Oracle-By-Example.
    [http://www.oracle.com/technology/obe/obe_bi/Lesson6_Designing_ETL_Data_Flow_Mappings/designing_etl_data_flow_mappings.htm]
    My OWB version is:
    OWB Client     : 10.2.0.1.31
    OWB Repository      : 10.2.0.1.0
    But the screenshots are different than what I am getting on my OWB. Am I using the correct version of Oracle-By-Example?
    I have created Mapping Dimension and Mapping Table. Now i want to add a Mapping Key Lookup. But as the screenshots shown in Oracle-By-Example are different, I cannot go further.
    Please help me.
    Thanks!
    Yogini

    Hi Yogini
    Here are some steps, it should be fairly straightforward, you can view the online help for more information.
    1. Drag and drop the Key Lookup operator on to the Mapping Editor.
    2. The Lookup wizard opens on the Welcome page. Select Next to move to page 2.
    3. Provide a name and description for the operator, default is KEY_LOOKUP. Hit Next to move to page 3.
    4. On the Groups page, hit Next.
    5. Select attributes to use in key lookup. For example those from the WAREHOUSES table in the OBE you are using that you will lookup in the COUNTRIES table. Shuttle those attrbutes to the right hand side. Hit Next to move to page 4.
    6. Select the COUNTRIES table from the combo box nder 'Select the object which has the lookup result. In the lookup conditions table ensure the matching criteria is set ie . LOCATION_ID from WAREHOUSE matches with LOCATION_ID from COUNTRIES. Hit Next to move to page 5.
    7. Here you can define the strategy for matches, just hit Next, then Finish. You have walked through all pages and are complete.
    Cheers
    David

  • SCD Map Lookup Max(dim_key)

    I have one scd 2 dimension STORES_DIM that works properly and the solved dim has 6 rows of each STORE_NAME for each hierarchy level and adds a corresponding unique dim key. Good
    I have another mapping to load another cube. I added a Key Lookup to grab the dimension key from the STORES_DIM based on the STORE_ID (input). Then inserts that key with the data into a cube. Although the STORES_DIM is built as scd 2, for this cube load I only need 1 row for each STORE_ID.
    The problem: The mapping key lookup grabs all 6 dimension keys for just 1 STORE_ID and loads 6 rows into the target cube when I only need 1 row inserted.
    The question:
    How to handle this so the lookup only grabs the last dim key for each STORE_ID. In sql I would do a "select max(dimension_key) from STORES_DIM where STORE_ID = SOURCE_STORE_ID". Or is there another operator to use for this instead of key lookup?
    Thanks for the assistance!!

    Hello RMomaha,
    let your key lookup point to the dimension STORES_DIM (lookup-tab) and select "Use the most current record" (Type2 History Lookup-tab). This option returns the current record that corresponds to the attribute being looked up using the lookup condition. The current record is the one with the latest timestamp.
    Regards
    jwehner

  • Problem with unique key for Fiscal_T_Time dimension lookup

    Hi,
    In my mapping, I use Lookup on Fiscal_T_Time dimension provided by oracle. The validation gives me a warning,saying "VLD-1603:Lookup condition for key lookup Fiscal_T_Time does not contain a complete unique key". I'm using <source_group>.date as input and L_Day_day as lookup column, which is shown as I select the unique key from the drop down list. Both have type matches. The configuration on the dimension also shows the constraint of the unique Key. What can be wrong?

    Continue my issue in another thread by Daming Wang on "More constraints need to add to Dimension". Thanks.

  • Lookups and Indexes??

    Hi Everybody,
    I am on OWB 10gr2.
    If we need to use lookup on source table, do we bring the lookup table to stagging area?
    As we stage table/view for look up need on OWB, do we build our own index in stagging schema?
    Do we need to match OWB index with existing index on source schema (data base)?
    Even if I have unique indexes on lookup table, I am gettinng "Warning VLD-1603: Lookup Condition for Key Lookup ......" during map validation. The execution goes ok.
    What can we do for such warnings?
    RI

    Hi,
    If we need to use lookup on source table, do we bring the lookup table to stagging area?If you access your source via database link and the performance is ok, I would do the lookup in the source system. Otherwise you have to load the source table into the dwh.
    As we stage table/view for look up need on OWB, do we build our own index in stagging schema?In staging area, only build the index you need for the lookup. If it is a small table you may not need an index at all.
    Do we need to match OWB index with existing index on source schema (data base)?see above
    Even if I have unique indexes on lookup table, I am gettinng "Warning VLD-1603: Lookup Condition for Key Lookup ......" during map validation. The execution goes ok.This warning does not appear when you do a lookup using a primary key. In my opinion it should also not appear when you do lookup using a unique index. So just ignore it.
    Regards,
    Carsten.

  • Lookup from multiple inbounds

    Hi all,
    Oracle 11.2g, warehouse builder 11gR2
    I have to take inputs from different sources and look up into one table
    INGPR1 ----> To_value
    INGPR2-----> From_value
    OUTGRP---->Value
    my lookup table looks like this
    From To value
    1 10 876
    11 20 776
    In Lookup Conditions--->Free style editing its not showing two Inputs , showing only one at a time ?
    Any clues?
    Thanks,
    Hesh.
    Edited by: Hesh on 15-Jun-2012 08:12

    I think this is bug 13492990 which doesn't look to be in a patch yet. Workaround would be to explicitly set the alias name in the HINT. For this you will have to generate the code with the default alias name and check the code for the alias that OWB generates and then set that name explicitly in the HINT.
    Cheers
    David

  • Issues with migrating lookups from 9.0.3 to 9.2

    Below is a text from a TAR we've submitted with Oracle. Has anyone else run into this issue when upgrading from 9.0.3 to 9.2?
    Lookups conditions not being properly migrated is a known issue when upgrading from OWB 9.0.3 to 9.2,
    documented in Bug 3989847 - Generated Code Has Invalid Aliases After Upgrade From 9.0.3 to 9.2

    Did you try putting the toplinkProject.xml into the META-INF directory? Does the same error occur?

  • Which is the difference between a join and a lookup key

    Hello everybody,
    I want to know in which case we must use a join or a lookup key.
    How OWB translate this two orders ?
    If you want more information, ask me.
    Best regards,
    Chris

    Hi,
    In a normal mapping, you can use a Key Lookup operator or a joiner. The Key Lookup operator operates as an outer join. You can use a joiner instead of a Key Lookup operator with the join condition specified with outer joins.
    In my view, use joiner with the lookup condition specified in outer join. Using keu lookups, in a complicated mapping can lead to the following error at runtime:
    "A table can be outer joined with atmost one other table".
    Apart from this, I think Key Lookups are generally useful in dimension lookups in a datawarehouse, where you can specify the level where you should search for a match. The 10g R2 user's guide provides the details on how to do this.
    Regards
    -AP

  • ETL Lookup problem

    Hi,
    I have a question about LOOKUP condition in Informatica. below query(TESTING FOR ONE MASTER OU ID) fetching multiple row_wid's for single master ou id. does it really load all those row_wids to the target? looks like it's not loading any row wids to the target if the lookup condition fetching more than one row wid.
    SELECT B.ROW_WID FROM W_REVN_FS A,W_PARTY_ORG_D B
    WHERE A.MASTER_OU_ID=B.MASTER_OU_ID
    AND A.MASTER_OU_ID='1-AOP-1937'
    Do I need to make sure lookup fetch only single row per one master ou id?
    Appreciate for your help.
    Thanks
    Jay.

    Hi Jay,
    When you do lookup on a particular table, if it has multiple records then it will return any one record from those multiple records and this may vary everytime.
    For Ex:
    If you have row_wid with 1,2,3,4,5 etc and all these records meets the lookup condition. In this case the lookup will return any one record from those 5 row_wid's. For every run it may return any one out of 5. If first run returns row_wid 1 then in the next run it may return row_wid 5 etc.
    It is upto your requirement that if you want to return only single row from the lookup, you can do that as well.
    Hope this helps..........
    Thanks,
    Navin Kumar Bolla

  • How to model in OWB if you have a subquery in your select statement? (11.2)

    Which operator (is it the Table operator) to use if I have a subquery as part of my select statement? (The way I do it works, but is not elegant. What I do is create a table for the subquery and than join that with the other sources to point to my target.) But, would appreciate the best way with OWB's features.
    Here is the entire SQL (including the subquery):
    SELECT to_numbe (null), course_id
    at.book, lp.NAME,
    (select b.pricing from qp_pricing_attributes b
    where b.list_id = ll.list_id and b.product = at.product) sign,
    ll.operand AS price, lhb.comments
    FROM
    pricing_attribs at,
    list_lines ll,
    list_h lp,
    list_b lhb
    WHERE 1 = 1
    and ll.list_line_id = atrib.list_line_id
    AND ll.list_header_id = lp.list_header_id
    AND lp.list_header_id = lhb.list_header_id
    Thanks you.

    Hi
    Doesn't need to be a table in the target. Let's take a very simple example, let's say you wanted to do the following;
    select ename,(select dname from dept d where d.deptno=e.deptno) from emp e
    Then DEPT is your lookup table and EMP is your driving table.
    1. Add EMP on to the canvas.
    2. Add in lookup operator
    3. Bind lookup to DEPT
    4. Hit finish
    5. Map EMP.DEPT to DEPT.INGRP1 (the lookup operator)
    6. Edit lookup operator, on Lookup Conditions tab set DEPTNO for lookup column, and DEPTNO for input attribute
    7. Lookup complete now
    You can add in a target table operator and map from the source EMP table and the output attributes of the lookup operator. you can change step 4 to carry on through wizard and define lookup, but I have chosen to do 5, to automatically get the names and datatypes of the inputs. There are lot of other options now in 11gR2 in the lookup.
    Hope this makes sense.
    Cheers
    David

  • Split records into Multiple csv files using a Threshold percentage

    Hi Gurus,
    I have a requirement to split the data into two csv file from a table using a threshold value(in Percentage) .
    Assume that If my source select query of interface fetches 2000 records , I will provide a threshold value like 20%.
    I need to generate a csv1 with 400 records(20% of 2000) and the rest of the records into another csv2.
    For implementing this I am trying to use the following process.
    1) Create a procedure with the select query to get the count of records.
    Total Records count: select count(1) from source_table <Joins> <Lookups> <Conditions>;
    2) Calculate the Record count to first CSV using the threshold_value.
    CSV1_Count=Total records count /threshold_value
    3) Create a view that fetches the CSV1_Count(400) records for CSV1 as follows.
    Create view CSV1_view as select Col1,Col2,Col3 from source_table <Joins> <Lookups> <Conditions>
    Where rownum<=CSV1_Count;
    4) Generate CSV1 file using View 'CSV1_View'
    5) Generate CSV2 File using the Interface with same select statement (with columns ) to generate a CSV.
    select Col1,Col2,Col3 from source_table ST <Joins> <Lookups> <Conditions>
    Left outer join (Select Col1 from CSV1_View ) CS on CS.Col1=ST.Col1 where CS.Col1 is null;
    Which gives the Total records minus the CS1_View records.
    The above process seems a bit complex and very simple . If any changes in my Interface I also need to change the procedure (counts the no:of records).
    Please provide your comments and feedback about this and looking for your inputs for any new simple approach or fine tune the above approach.
    Thanks,
    Arjun

    Arjun,
    This are my thoughts and Lets do it in 3 Steps
    Step 1.  ODI Procedure
    Drop table Temp_20 ;
    Create table Temp_20 as select * from table where rownum < ( SELECT TRUNC( COUNT(1) /5) FROM TABLE ) .
    [ ** This way iam fetching approx 20% of the table data and loading into Temp table . 1/5 th is 20%  so i am dividing count by 5
    I don't believe View will help you especially with RowNum as if you run the same query with rownum < N the rows order might differ . so Temp table is great ]
    Step 2 .  Use OdiSqlUnload  with select columns  from temp_20
    Step 3 . Use again OdiSqlUnload  with  select columns from table where  ( uk keys ) not in ( selecy uk_keys from temp_20)
    [** this way you can pick the remaining 80% ** and the data will be not repeat itself across 20% and 80% , as might happen with view ]
    what do you think ?

  • VLD-1141: Internal error during mapping generation.

    I am getting the "VLD-1141: Internal error during mapping generation" error when deploying a mapping. This mapping was previously working fine. As part of a re-factoring effort, for all the underlying tables and views, we replace 2 existing columns with a new column. All the objects were successfully re-imported and synchronized in the mapping. The mapping is using Mapping Input Parameter, Lookups, Expression Transformations, Splitter, Set Operator, Source & Target Tables. All these transformation were part of the earlier working version of the mapping.
    On doing validation within the mapping, I get a success message followed by 4 warning for the Lookup Condition on key Lookup does not contain a complete unique key. Before the re-factoring effort, I was getting the same 4 warning messages, however the mapping was executing correctly.
    When I do Generate within the mapping, I get the following message:
    Code cannot be generated.
    Click the message tab for details.
    In the Design Center, when I do a validation on the mapping I get the following error:
    VLD-1141: Internal error during mapping generation.
    java.lang.NullPointerException
    at oracle.wh.service.impl.mapping.component.Sequence.getSequenceExpressions(Sequence.java:138)
    at oracle.wh.service.impl.mapping.component.Sequence.doSequenceValidation(Sequence.java:239)
    at oracle.wh.service.impl.mapping.component.entity.EntitySqlDelegate.prepareOutputContext2(EntitySqlDelegate.java:123)
    at oracle.wh.service.impl.mapping.component.entity.EntitySqlDelegate.prepareOutputContext2(EntitySqlDelegate.java:97)
    at oracle.wh.service.impl.mapping.component.entity.EntitySqlDelegate.prepareOutputContext(EntitySqlDelegate.java:78)
    at oracle.wh.service.impl.mapping.generation.WBMappingGenerator.generate(WBMappingGenerator.java:240)
    at oracle.wh.service.impl.mapping.generation.PlSqlGenerationMediator.assembleSetBasedInternal(PlSqlGenerationMediator.java:2108)
    at oracle.wh.service.impl.mapping.generation.PlSqlGenerationMediator.assembleSetBased(PlSqlGenerationMediator.java:2090)
    at oracle.wh.service.impl.mapping.generation.PlSqlGenerationMediator.assemble(PlSqlGenerationMediator.java:541)
    at oracle.wh.service.impl.mapping.generation.WBMappingGenerator.generate(WBMappingGenerator.java:798)
    at oracle.wh.service.impl.mapping.generation.WBMappingGenerator.generate(WBMappingGenerator.java:335)
    at oracle.wh.service.impl.mapping.generation.WBDeployableMappingGenerator.generate(WBDeployableMappingGenerator.java:102)
    at oracle.wh.service.impl.generation.common.WBGenerationService.generateCode(WBGenerationService.java:433)
    at oracle.wh.service.impl.generation.common.WBGenerationService.generateCode(WBGenerationService.java:311)
    at oracle.wh.service.impl.generation.service.WhValidationGenerationTransaction.run(WhValidationGenerationTransaction.java:251)
    Any help in this regards would be appreciated.
    Naval

    Hi,
    I think your mapping is corrupted by converting two columns to one. The owb has always a problem if you change the structure of a table which is bound to a table operator. The way to avoid this is to drop the table operator after changing the table in the table editor and recreate it with the changed table definition.
    Make a test: select the new attribut in the table operator and look left on the configuration window. To which table and attribute it's bound?
    Regards,
    Detlef

  • Pluggable Mapping causing VLD 1600 validation error

    We are using OWB client 11g R2 on windows. I am trying to use the pluggable mapping functionality to use for our reference data lookups, whereby we want to retrieve full descriptions in several languages from the reference data table. The standalone mapping takes in two parameters in the input signature, both NVARCHAR2, a reference type and reference code to perform the lookup. There is then a key lookup whose output (5 NVARCHAR2 values) goes to an expression which has a CASE statement to evaluate the results before passing them to the output signature.
    The problem is when using the pluggable mapping in a normal mapping it does not validate, and I am getting the VLD-1600: Lookup Condition for Key Lookup REF_DATA_APEX is blank. error. The key lookup of course does have a Lookup Condition.
    The mapping is a simple one, taking a source and mostly mapping directly to the target. It is set based only. I have one source attribute being passed to the pluggable mapping along with a constant, and the output is passed to an expression (which doesn't actually do anything, but without this I got API8003 error when connecting the output attributes to the target attributes).
    Is there something I am missing in how to implement this feature ?

    Hi,
    I am having the same problem with pluggable mapping and lookup operator, when mapping is syncronized it gives error VLD1108. I believe it is a bug of OWB 11.2.0.2.
    Did you manage to resolve it?
    Thanks,
    Alex

Maybe you are looking for

  • Problem with Export to Excel from ALV view.

    Hello @all, i have a problem on my webdynpro application. I use the component SALV_WD_TABLE. I become display my data but when i want to export the table to ecel, i became a short dump with the message in the browser: Access via 'NULL' object referen

  • Can I install Mac OS 10.4.7 CD's meant for an imac intel chip (Jan 2007)??

    Can I install Mac OS 10.4.7 CD's that came from an imac intel chip (Jan 2007) ONTO an ibook power pc G3? The ibook only has a CD drive and I believe the OS installs are CD's not DVD's as there are 2 of them. The ibook currently is running OS 10.3.9 w

  • FLASH problem on EVERY browser

    here is the text attached from the error file created when flash on youtube crashed browsers:DeepNet Explorer+Chrome+Firefox & IE Can you please direct me in resolving this issue - Thanks Unhandled Exception Code: c0000005 Description: EXCEPTION_ACCE

  • I forgot my restriction pass code on my ipad

    I want to download an app and I have to turn off restrictions but I forgot the 4 number pass code

  • DB buffer cache vs. SQL query & PL/SQL function result cache

    Hi all, Started preparing for OCA cert. just myself using McGraw Hill's exam guide. Have a question about memory structures. Actually, DB buffer cache is used to copy e.g. SELECT queries result data blocks, that can be reused by another session (serv