Skip to Content

SAP Universe duplicate where clause generation.

I am using Information Design Tool 4.2 Build: Version: 4.2 Support Pack 4 to create a universe which will be used by Web Intelligence 4.2 SP 4. All of my tables have a flag that I must use as a filter if I am retrieving data from that table. This flag must be used when retrieving data so I decided to add it into the join logic within the data foundation in addition to the tradition primary key join logic. This will ensure that anytime a join path is used then a corresponding where clause for that tables flag is produce in webi. The problem is that I get duplicate where clause conditions when I select dimension from multiple tables. For example I have 3 tables, A<B<C and in the join from A to B I have conditions that say A.flag = true and B.flag = true. In the join from B to C I have B.flag = true and C.flag = true. Now if I select a dimension from table A and one from table C then webi produces a SQL statement that duplicates the B.flag = true condition. Am I doing this correctly and are there any negative side effects to having this duplication or is there a different way to achieve every table using a flag condition?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 26, 2018 at 04:41 PM

    Most database optimizers should remove the redundant join, but a better solution would be to apply the filters to the table instead of including them in joins. In the DF, right-click on the column to apply the filter to, and hit Insert Filter. The dialog will look like the join dialog, but you can enter the filter text here (ex. "a.flag = 'true'"). This filter will be included in the SQL whenever the table is used.

    For what it's worth, the "old way" of doing this was to create a "self-join", which is a join that only references one table. It is identical to the method described above, which is really just a more clear way of creating the self-join.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.