Skip to Content

SAP Universe duplicate where clause generation.

I am using Information Design Tool 4.2 Build: 14.2.4.2410 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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • 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 comment
    10|10000 characters needed characters exceeded