From 13a1be35afdd53723b6ba8a244a5c46031876659 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 24 Dec 2024 10:20:08 +0000 Subject: [PATCH] move bullets adn consolidate --- website/docs/docs/build/join-logic.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/website/docs/docs/build/join-logic.md b/website/docs/docs/build/join-logic.md index 67122302e2..d11c0248d2 100644 --- a/website/docs/docs/build/join-logic.md +++ b/website/docs/docs/build/join-logic.md @@ -23,9 +23,13 @@ MetricFlow automatically generates the necessary joins to the defined semantic o This section explains the different types of joins that can be used with entities and how to query them. ::: -- MetricFlow primarily uses left joins for joins. -- For queries that involve multiple `fct` models, MetricFlow uses full outer joins. -- It restricts the use of fan-out and chasm joins. +Metricflow uses these specific join strategies: + +- Primarily uses left joins when joining `fct` and `dim` models. Left joins make sure all rows from the "base" table are retained, while matching rows are included from the joined table. +- For queries that involve multiple `fct` models, MetricFlow uses full outer joins to ensure all data points are captured, even when some `dim` or `fct` models are missing in certain tables. +- MetricFlow restricts the use of fan-out and chasm joins. + +Refer to [SQL examples](#sql-examples) for more information on how MetricFlow handles joins in practice. The following table identifies which joins are allowed based on specific entity types to prevent the creation of risky joins. This table primarily represents left joins unless otherwise specified. For scenarios involving multiple `fct` models, MetricFlow uses full outer joins. @@ -41,14 +45,6 @@ The following table identifies which joins are allowed based on specific entity | Foreign | Unique | ✅ Left | | Foreign | Foreign | ❌ Fan-out (Not allowed) | - -### Explanation of joins - -- **Left joins** — MetricFlow defaults to left joins when joining `fct` and `dim` models. Left joins make sure all rows from the "base" table are retained, while matching rows are included from the joined table. -- **Full outer joins** — For queries that involve multiple `fct` models, MetricFlow uses full outer joins to ensure all data points are captured, even when some `dim` or `fct` models are missing in certain tables. - -Refer to [SQL examples](#sql-examples) for more information on how MetricFlow handles joins in practice. - ### Semantic validation MetricFlow performs semantic validation by executing `explain` queries in the data platform to ensure that the generated SQL gets executed without errors. This validation includes: