Earlier quoted context omitted.
One approach is to create views for the required data and then just select the columns which are needed. The joins will be pruned by the query planner if they are not needed, so there is no need for conditional joins.
> The joins will be pruned by the query planner if they are not needed, so there is no need for conditional joins. I always wondered about this. How reliable is that in your experience? Thank you in advance.
Depends on the underlying database, and you'd have to test your query to have any level of certainty.
That being said, query planning is generally where Oracle/MSSQl outshine MySQL/Postgres, especially for pruning unnecessary joins. BigQuery is great at it IME.