Wrong joins SQL getting created

Hello Team,

I am using Helical Insight EE v 4.0 RC2. I am creating reports but for one of the report I am seeing that it is showing incorrect data. When I looked at the SQL I saw that an additional inner join is getting added. Why is this happening?

Thank You

1 Like

Hello Tarun,

You should have a look at your metadata joins to understand the reason behind the additional joins and why is it different because of which it is different.
When creating the metadata it is always ideal that there should not be any cyclical joins, or otherwise you might see some data discrepancy in certain cases. When we say a cyclical joins I mean that there should be only one path from point A to point B.
Example: if at the metadata level you have defined below joins,
A Innerjoin B
B innerjoin C
A innerjoin C
So you can see that if we create a report from table A and Table C there could be two paths from A to C, one is direct and the other is via B. So this is an example of cyclic joins. Our application might join A to C via B, whereas you would be expecting the data directly and hence you will see such kind of issues. Hence you may revisit your joining conditions.
You could also look at creating a new metadata also.

Thank you
From Team Helical.