2024-02-28 - Self Tile Joins¶
Problem¶
Magicians are unable to join a Tile to itself in the Change Rules Step screen because the aliases for the Tile names would be the same and there is no way to refer to the joined tile (with the same name as the driving tile).
Solution¶
Extended the functionality of the existing “Relationship Multi Table” rule type to handle Tiles being joined on themselves.
Leverage the Magic¶
You can now use the Rule Step to join a Tile to itself, and the backend will magically deal with the naming so it is valid.
Customer¶
Bingo!
Now I can just add the same Tile twice and all that complex SQL code is taken care of without me having to think about it.
Magician Partner¶
The updated pattern in the “Relationship Multi Table” attribute is:
alias : join conditions : join type
at a minimum this attribute expects a join condition , eg table_a.key = table_b.key
examples:
join condition (existing)
table_a.key = table_b.key
outer join (existing)
table_a.key = table_b.key : left join
aliased join (new)
table_xxx : table_a.key = table_xxx.key
aliased join with with outer join (new)
table_xxx : table_a.key - table_xxx.key : outer
the alias allows the magician to refer to the same source table multiple times in a change rule, because you can alias the second/third etc copy of that table
Last Refreshed¶
Doc Refreshed: 2024-05-23