on 09-26-2018 5:20 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.