Left outer join (business model and mapping layer)

hi, experts!
!http://img693.imageshack.us/img693/9642/joinp.png!
if there are a dimension table and a fact table, I wanna have a left join from dimension to fact (select * from dimension a left outer join fact b on a.key = b.key;)
is the selection for cardinality correct?
And I only change TYPE to "Left Outer" ?
however, I tested on this setting.
if I only select the dimension , 15xx records returned.
if I select the dimension and fact, 14xx records returned.
any wrong setting ?

Just to make I'm getting your situation correct, are the following true:
--you've got a total of 15 records in your dimension table
--you want to see every dimension record, regardless if there is any fact records that have that dimension
--if a fact record exists, it must have one of the 15 values in your dimension table.
--a single dimension record can match to multiple fact records
If those statements are true, then you want your dimension cardinality set to 1 and your fact cardinality set to N.
Then you'll want to do the left outer join like you mentioned and you should be set.
-Joe

Similar Messages

  • Business Model and Mapping layer

    I am trying to create a logical dimension table by dragging the corresponding table from the physical layer. However, in the business model layer it shows up with a yellow icon indicating it is a logical fact table. Please help me how I create a logical dimension table in the business model layer. Not sure what I am doing wrong here.
    Thanks.

    Hello Saichand,
    No I did not. Do I have to create joins even when I am dragging this object from the physical layer? Let me read and learn how to create the joins. I will get back if I will have more questions.
    But, thanks for the quick response. As you can see this is the first time I am trying to modify the business model layer.
    Thanks.

  • Left outer join usage in obiee BMM layer

    Hi All,
    We lately started using left outer join in our bmm layer , to meet the requirement expectation .
    problem : We have two tables  Fact A , Dim B . There is an join int_id column to join them . Problem is... in table Dim B , we have 3 millions rows of Int_id and in fact table it is loaded for only data available(1 million rows).
    Due to this we are dropping rows  in the report ..as it is only getting data where fact.int_id = dim.int_id. So we used left outer join to solve to one particular report .(we know we can do ETl to load dummy int_id and make it null , but it is huge effort ..so we did left outer join)
    These days , same kind of reports are in requirement . if i keep on doing same left outer join to meet the requirement in BMM layer ? is there any disadvantages due to this ? any performance degrade due to this ? please throw few lines on left outer join and its usage ?
    Thanks,
    Sri

    Remodel your tables that might be a partition or any other way and follow in BI as per your new model.
    Simply: Go for ETL kind of solution

  • How to do left outer join in one-one mapping

    I tried to do a left outer join between two tables. I specified
    kodo.jdbc.DBDictionary: JoinSyntax=sql92 in kodo.properties. I used
    ref-join-type="outer" in the package.mapping. However, I still see Kodo is
    translating my queries using inner join. How can I force kodo to use outer
    join (or maybe even to use left outer join) when translating my queries?
    Thanks.

    Kodo will automatically use an outer join when eager-fetching a to-one
    relation (unless you have set null-value="exception" on the field, in
    which case Kodo knows it can use an inner join). There is no need to set
    the ref-join type (in fact, that is only for when the foreign key
    columns are in a joined table).
    When you place criteria on a relation in a query, though, the relation
    must exist to satisfy the query. For example, in the filter:
    "relation.x == y"
    The "relation" field must hold a related object to satisfy the
    expression, just as in Java.
    If you want the "relation" field to optionally be null, then write your
    filter exactly as you would in Java:
    "relation == null || relation.x == y"
    Kodo will correctly use an outer join in this case because the filter
    can be satisfied even when no related object exists.

  • Left outer join on Fact and dimension table.

    Hi all, I have a fact F with account number and few measures as columns.
    I also have a dimension D with account number, account name columns.
    Few account numbers from Fact doesnt exist in Dimension D , but they need to show up in the report though.
    How do I left join Fact and Dimension D in RPD?
    I have this report where I need to show Account Number, Account name, measures.
    If D doesnt have certain account numbers, I need to convert that account number from F as string and show it in the report in account name column.
    Can you pls help.

    Ok. I tried this:
    Driving table : Fact, Left outer join -- didnt work.
    Driving table: Dimension D left outer join -- didnt work either
    In either the case, I see physical query as D left outer Join on Fact F. and omitting the rows.
    And then I tried this -
    Driving table: Fact, RIght outer join.
    Now, this is giving me error:
    Sybase][ODBC Driver]Internal Error. [nQSError: 16001] ODBC error state: 00000 code: 30128 message: [Sybase][ODBC Driver]Data overflow. Increase specified column size or buffer size. [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement. (HY000)
    I checked all columns, everything matched with database table type and size.
    I am pulling Fact.account number, Dimension.account name, Fact.Measures. I am seeing this error each time I pull Fact.Account number.

  • Repositry Business Model and Mapping  delete dimention

    Dear,
    I delete dimention of table , when i try to create new dimention for table then it through this error Admin Tool is unable to create structure for dimention CustomerdiM

    Dear ,
    When first time, create dimension it call column in dimension hierarchy and detail. But after i delete dimension and then try to create dimension, it shows error and create dimension in blue color and also it not call the table columns in new create dimension and dimension properties shows disable table tab
    Regards

  • Left Outer Joining multiple tables to one source table FAILS with VLD-1511

    Hi all,
    Is it me, or is OWB unable to handle left outer joining 1 source table to multiple other tables?
    I want to load a fact table so I have 1 source table with measures. This table must be outer joined to some dimensions that have their FK in the fact table.
    The SQL statement would look like this (and is perfectly valid):
    select ...
    from input, dim1, dim2
    where input.c1 = dim1.c1(+)
    and input.c2 = dim2.c2(+);
    I put the where clause in the joiner operator and validate, but that gives me message VLD-1511: A table may be outer joined to at most one other table.
    Even splitting this up into one outer join per joiner still gives this message.
    A search and look around on the forum and on metalink shows there are related issues (like bug 3334035). Seemingly creating a view is the work-around to use.....? (ie downgrading owb to a simple gui tool) }-;
    Have other people experienced this problem of not being able to outer join one input table to multiple other tables?
    Thanks,
    Ed

    I have had some feedback from Oracle. It turns out this has to do with 2 issues. Below I have pasted the text that Support gave me:
    <---------- START QUOTE ---------->
    RESEARCH
    =========
    Bug 3437036 KEY LOOKUP DOES NOT DETECT ORA-1417 IN VALIDATE/GENERATE STEP
    Unpublished Bug 4211684 FORWARD PORT OF BUG 3437036
    shows:
    Some more development has been completed when this bug is fixed in Paris.
    The following are the details:
    1. If the join condition contains a full outer join such as
    tab1.c (+) = tab2.c (+) and tab2.c (+) = tab3.c
    then the new validations implemented for this bug do not apply since
    in OWB, full outer join triggers generation of joins in ANSI syntax.
    ANSI syntax does not have the original problem the base bug of this
    bug reported.
    2. If the join condition does not contain any full outer join condition,
    then the join is generated in Oracle join syntax, which is subject two
    several restrictions. The fix to this bug check two of the restrictions.
    3. The first restriction in Oracle syntax is that the outer join operator
    "(+)" can only directly be attached to a column name. If you attach it
    to an expression, such as the following:
    (tab1.c + 1) (+) = tab2.c
    Then there will be an ORA-936 error at the time of mapping deployment.
    For this case, I have added a validation message VLD-1512 to error out
    this situation.
    4. The second restriction in Oracle syntax is that a table can only be
    outer joined to exactly one other table.
    For example, this is an invalid join in Oracle syntax:
    tab1.c (+) = tab2.c and tab1.d (+) = tab3.d
    because tab1 is left outer joined to tab2 and tab3.
    But note that the following is still valid in Oracle syntax:
    tab1.c (+) = tab2.c and tab1.d = tab3.d (+)
    because tab1 is left outer joined to tab2 and right outer joined to tab3.
    So this latter case does not violate the restriction that "same oj" to
    more than 1 table is not allowed.
    If same oj to more than 1 table is specified in a join condition,
    VLD-1511 will be issued, and the map is made invalid.
    <---------- END QUOTE ---------->
    OWB does a partial validation, ie not all access paths are (can be) checked. A full check is only done by the database itself. So some scenarios (like checking whether multiple tables are outer joined the correct way) are not checked, and in this case are flagged with an error (even though it is actually a correct scenario).
    Seemingly this was not flagged with an error in earlier versions of OWB, so beware, OWB behaviour may change when upgrading...
    Alternative solutions are (1) using key lookups, (2) using a view with all outer joins in there, (3) using intermediate result tables between the joins.
    Hope this info helps some people prevent spending too much time on a false error message,
    Ed

  • Filter on "---" in Left Outer Join Query

    Hi guys,
    very basic question but I have not found an answer, yet. I built an left outer join MDO query and need to select all those dataset that did not find a "partner", that is fields are set to "---". However, I do not manage to filter on '---', NULL...
    When using SQL, it appears to be a String "---" but in MDO???

    Hey guys, found out that IS NULL needs to be used in query. Anyway, it appears to cause problems somewhere else.
    I placed an IS NULL filter expression inside a join query but query did not return any results when called in by transaction. After removing this line, both NULL and NOT NULL data were returned. When used in test mode, IS NULL was working fine...

  • Display all dates between date range (Time Dimension left outer join Fact)

    All,
    I have done some searching around this issue but within all the posts regarding date variables, date prompts and date filtering I haven't seen one exactly answering my issue (maybe they are and I just dont have my head around it correctly yet).
    My report requirement is to allow a user to select a start day and an end day. The report should show all activity between those two days - AND display 0/null on days where there is no activity. That second part is where I am getting hung up.
    The tables in question are:
    TimeDim
    EventFact
    CustomerDim
    My BMM is setup as follows:
    TimeDim left outer join EventFact
    CustomerDim inner join EventFact
    If I run a report selecting DAY from TimeDim and a measure1 from EventFact with day range 1/1/2010 - 12/31/2010 .. I get a record for every day and it looks perfect because of the left outer join between TimeDim and CustomerDim.
    But .. if I add in a field from CustomerDim, select TimeDim.DAY, CustomerDim.CUSTNAME, EventFact.MEASURE1, OBIEE only returns records for the days that have EventFact records.
    This is due to the fact that the TimeDim is still outer joined into EventFact but adding in CustomerDim makes OBIEE setup an inner join between those tables which then causes only data to be returned where EventFact data exists.
    There is a way around this in this simple case and that is to define the relationship between CustomerDim and EventFact as an outer join as well. This will give the desired effect (but an outer join between these two tables is not the true relationship) and as I add additional dimensions and add additional logical sources to a single dimension in the BMM it gets complicated and messy.
    Ive also messed with setting the driving table in the relationship, etc.. but it has not given the desired effect.
    Has anyone ever encountered the need to force display all dates within a specfied range with a fact table that may not have an entry for every date?
    Thanks in advance.
    K
    Edited by: user_K on Apr 27, 2010 11:32 AM

    It worked!!!* Even my time drill downs and date based filtering still work!
    That is awesome. Never would have thought of that intuitively.
    Now, just need a little help understanding how it works. When I run my report and check the logs I can see that two queries are issued:
    Query 1: Joins the fact table to all the associated dimensions. I even changed all the relationships to inner joins (which is what they truly are). And calculates the original measure. If I copy and paste this query into sql developer it runs fine but only returns those rows that joined to the time dimension - which is what was happening before. It is correct but I wanted a record for every time dimension record.
    Query 2: Looks like the following:
    select sum(0)
    from timedim
    where date between <dateprompt1> and <dateprompt2>
    group by month *<--* this is the time dimension level specified in Query 1, so it knows to aggregate to the month level as was done in query 1
    Final Question: So what is OBIEE doing ultimately, does it issue these two requests and then perform a full outer join or something to bring them together? I couldn't see anywhere in the log a complete query that I could just run to see a similar result that I was getting in Answers.
    Thanks for all the help .. Id give more points if I could.
    K

  • How to find Inner join or (Left)outer join for Infoset

    Dear Experts,
    We have one Infoset which is based on the Master data and DSO. It is linked 0BPARTNER field From the Master Data and SOLD TO PARTY field from the DSO.
    Here Could you please suggest me how can we able to find that whether this Infoset is based on Inner Join or (Left) outer join.
    Thanks and Regards,
    Suresh.

    HI Suresh,
    If the infoset is based on left outer join , you see the respective table shaded in a dirrerent colour and also displays
    that it is a left outer join in the connection
    refer the below link for the details on left outer join , you can make a join as left outer from the context menu of the
    object required
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/21/af0942b9dc9c39e10000000a155106/frameset.htm
    Regards,
    Sathya

  • Left Outer Join in Logical Layer

    Dear Gurus,
    I have report like this:
    Absent
    3 31
    Month-Name
    Jan 1 2
    Feb
    March
    I use Master Date as dimension and Transactional Absent as fact
    How if I want to show the date (from 1 to 31) even if there's no transaction?
    How to use driving table and join in the business logical?or there is another alternatif?
    Please help
    Regards
    Maria

    Hi,
    If you want to show all the transactions for the month, even if there is no transactions then you need to use the outer joins present in the BMM layer. Left, right and full outer joins according to your requirement. Driving tables are used when the number of the data is low to pick up the table.
    Hope this helped/ answered.
    Regards
    MuRam

  • Left Outer Join in BMM layer

    Hi All,
    while building the RPD we have to use the join as Left outer join for two tables , we added join condition in BMM layer like evey table we have three tabs like General,Column Maooing and Content.
    In General tab we have to sections like map to these tabls and Joins right. In the Join Scetion we add join conditions for two tables as left outer join.
    Now i need to move the first table as second table and wise versa , how i can?? move these two tables
    Thanks for your help.

    Hi User,
    You will have to remove and add the table as there is no option to reorder the tables.
    Rgds,
    Dpka

  • Left outer join in presentation layer

    Could I do left outer join in presentation layer? I have 2 reports. They both have a common column - "Month". The first report have columns - "Month" and "Measure1" and the second report have columns - "Month" and "Measure2". I would like to put them together so the final report would have "Month", "Measure1" and "Measure2".
    Thanks,
    Ted

    Ted,
    It is not clear to me, why you want to do an outer join. If the dimension Month is shared by both "Measure1" and "Measure2", then it will work without any problem (assuming the RPD is configured correctly).
    An outer join comes into play if you need to preserve the dimension records. Let's assume you want to run an analysis like "Show me all months were there was no sales". In plain SQL you would to do a left-outer join between the Month dimension table and the sales fact table. If you want to know how this can be achieved in OBIEE you might want to have a look here [Outer join style report - OBIEE 10g|https://forums.oracle.com/forums/message.jspa?messageID=9805768#9805768]. This should be still valid for OBIEE 11g.
    Best regards,
    Peter

  • Problem with XMLTABLE and LEFT OUTER JOIN

    Hi all.
    I have one problem with XMLTABLE and LEFT OUTER JOIN, in 11g it returns correct result but in 10g it doesn't, it is trated as INNER JOIN.
    SELECT * FROM v$version;
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    --test for 11g
    CREATE TABLE XML_TEST(
         ID NUMBER(2,0),
         XML XMLTYPE
    INSERT INTO XML_TEST
    VALUES
         1,
         XMLTYPE
              <msg>
                   <data>
                        <fields>
                             <id>g1</id>
                             <dat>data1</dat>
                        </fields>
                   </data>
              </msg>
    INSERT INTO XML_TEST
    VALUES
         2,
         XMLTYPE
              <msg>
                   <data>
                        <fields>
                             <id>g2</id>
                             <dat>data2</dat>
                        </fields>
                   </data>
              </msg>
    INSERT INTO XML_TEST
    VALUES
         3,
         XMLTYPE
              <msg>
                   <data>
                        <fields>
                             <id>g3</id>
                             <dat>data3</dat>
                        </fields>
                        <fields>
                             <id>g4</id>
                             <dat>data4</dat>
                        </fields>
                        <fields>
                             <dat>data5</dat>
                        </fields>
                   </data>
              </msg>
    SELECT
         t.id,
         x.dat,
         y.seqno,
         y.id_real
    FROM
         xml_test t,
         XMLTABLE
              '/msg/data/fields'
              passing t.xml
              columns
                   dat VARCHAR2(10) path 'dat',
                   id XMLTYPE path 'id'
         )x LEFT OUTER JOIN
         XMLTABLE
              'id'
              passing x.id
              columns
                   seqno FOR ORDINALITY,
                   id_real VARCHAR2(30) PATH '.'
         )y ON 1=1
    ID     DAT     SEQNO     ID_REAL
    1     data1     1     g1
    2     data2     1     g2
    3     data3     1     g3
    3     data4     1     g4
    3     data5          Here's everything fine, now the problem:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for HPUX: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    --exactly the same environment as 11g (tables and rows)
    SELECT
         t.id,
         x.dat,
         y.seqno,
         y.id_real
    FROM
         xml_test t,
         XMLTABLE
              '/msg/data/fields'
              passing t.xml
              columns
                   dat VARCHAR2(10) path 'dat',
                   id XMLTYPE path 'id'
         )x LEFT OUTER JOIN
         XMLTABLE
              'id'
              passing x.id
              columns
                   seqno FOR ORDINALITY,
                   id_real VARCHAR2(30) PATH '.'
         )y ON 1=1
    ID     DAT     SEQNO     ID_REAL
    1     data1     1     g1
    2     data2     1     g2
    3     data3     1     g3
    3     data4     1     g4As you can see in 10g I don't have the last row, it seems that Oracle 10g doesn't recognize the LEFT OUTER JOIN.
    Is this a bug?, Metalink says that sometimes we can have an ORA-0600 but in this case there is no error returned, just incorrect results.
    Please help.
    Regards.

    Hi A_Non.
    Thanks a lot, I tried with this:
    SELECT
         t.id,
         x.dat,
         y.seqno,
         y.id_real
    FROM
         xml_test t,
         XMLTABLE
              '/msg/data/fields'
              passing t.xml
              columns
                   dat VARCHAR2(10) path 'dat',
                   id XMLTYPE path 'id'
         )x,
         XMLTABLE
              'id'
              passing x.id
              columns
                   seqno FOR ORDINALITY,
                   id_real VARCHAR2(30) PATH '.'
         )(+) y ;And is giving me the complete output.
    Thanks again.
    Regards.

  • Left Outer Join with more than two tables in both CR 8.5 and XIR2

    I am trying to create a report and I have tried two versions of Crystal but I ultimately need the report in CR8.5 for compatibility with the client's system.  I think I am starting to figure out what might be wrong and it might be my understanding of SQL, but I can't see why someone hasn't needed this in the past. Ultimately I want to see all projects and any journal entry that might be posted for that project.
    Database is MySQL 5.0.38 and using MySQL ODBC driver 3.51.19.
    Project header table information will be populated. Each line item on a journal entry can be tagged with the project ID. But for me to pull the journal entry date I need also to link to a third table for the journal entry header info.
    I want to see all projects, whether a journal entry has been posted or not.
    So the links are like this
    ProjectHeader --->Left Outer Join ---> JELines ---> Inner Join ---> JEHeader
    I think in this scenerio Crystal is treating the LOJ as an IJ.
    I created two brand new reports today, one in CR8.5 and one in CR XIR2. Once I edited the automatic CR8.5 SQL statement (which I have been doing for years, usually without problem), they both ran properly. I linked customers to their invoices. Customers without invoices showed properly. But then I linked the invoices to the payments of the invoices and immediately lost customers without orders in both reports.
    So apparently only two tables are allowed in Outer Joins. Does this make sense?  I checked out the w3schools tutorial on SQL and it doesn't mention this limitation and I can't find anywhere else that it specifically indicates this but all samples of code I have seen only show two tables.  I just thought for presentation as a sample that was easiest to understand and we could expand as necessary.
    If this is correct, how does one go about accounting for this kind of thing?  One solution that goes through my mind is creating a view at the database level for the link between journal entry lines and journal entry headers.  Would this be a good solution under normal circumstances?
    A second option that I had to implement because of timelines, is to use a subreport linked to the main report through the project ID to pull the information for the journal entries and just pass the totals I need to the main report through a shared variable.
    These aren't normal circumstances because I don't have access to the database so I can't create the view.  I have come across this concept several times and I have been able to use subreports to solve it but I am trying to find a better solution for the future as sometimes subreports can be slow.  So are there any alternatives I have not considered here?
    TIA rasinc

    So after some more work and another post.  I was able to get this to work.
    Items disappear when linking to another table
    My issues were two fold.  I was selecting on the tables on the right-side of the original Inner Join.  However, I was checking for Nulls.  This apparently is correct but you must check for the Nulls first eg. (IsNull (JEHeader.Field1) OR JEHeader.Field1 <= 100).  I had my original statement reversed checking for <= 100 before checking for Nulls.
    I also did not set all links to be Left Outer Join.  I had the Inner Join.  I actually have about 6 tables in this report so all the links need to be set Outer Join.  So this now seems to be corrected.
    Thanks

Maybe you are looking for

  • Hard drive died - want to create bootable external

    The hard drive on my spare laptop - and old PowerBook G4 - just died, and I'll probably wind up getting a new HD installed. In the meantime, I was thinking of booting it from an external drive, of which I have several. But none are clones of the old

  • CC Apps for download not showing up in Applications Manager

    I would like to download additional CC applications (Photoshop and InDesign) however those options do not show up on my Adobe Applications Manager. Why are these two apps not showing up? I do not yet have them installed on my computer.

  • How to determine the value of  -D__SUNPRO_CC?

    Could any body tell me how to determine the value of -D__SUNPRO_CC? Iam now using Sun Studio 9. Thanks in advance.

  • Kernel Panic Errors 0x0039BDDF

    Hi everyone in the forum i am new here and dont know whether this is the right place to post this question i tried searching the forums and the faq's on this site first but didnt find any solution i would be thank ful if some one could help me with t

  • Create document from template without launching Adobe Bridge (InDesign CS4)

    When I select "New Document from Template...  while using InDesign CS4, Adobe Bridge launches instead of a search menu. It's much harder for me to navigate through Bridge than it is with a standard New menu. How can I get InDesign NOT to launch Bridg