I have a schema I am working on right now, here are the table details
A-->B<--C
A-- Dimension table
B-- Fact( Summarized at Account level)
C-- Dimension atleast it is called like that, but does have a measure object
At any given point the user can run a query that could include objects from three tables.
So I beleive this leads to fan trap ( I am trying to see this writing sql myself) but I would like to get an opinion from you guys is my undersatnding correct.
If so what should I bring in to the report make sure that the understanding is correct.
Thanks.
Basically you have a fan trap if you have measures and dimensions that cross a one-<many relationship. In your case, you have measures and dimensions from C linked to B, and measures from B and C both, so you have a fan trap. To fix it, you should create an alias for C and create your measures from this “pseudo-fact” table, then resolve the chasm trap created by using contexts.
Dave
If you are still with the topic help me evaluating this , so in my case just to test I donot do anything to resolve fan trap .
I bring in dimesnion from A, Measure from B, Measure from c and dimensions from A,B
The rows returned and totals returned do not change even I write free hand SQL individually for B,C
So I guess my question would be how would I prove the trap(Incorrect Results)
P.S I am also reading ZEN presentation as we speak.
If you have Multiple SQL Statements for each Measure turned on, then this query will work. It’s only when you include dimensions from the “C” table that you create a true fan trap. At least that’s the way I see it based on your explanation…
I have turned off the Multiple SQL statements feature just to evaluate the trap
like I mentioned.
And yes I do have dimensions coming from C
So in order to get the incorrect results I would be selecting a dimensions from A, B, C
Measure from B, Measure from C this should create a true fan trap? Is that correct?