@@ -47,7 +47,7 @@ def test_get_lineage(client: TestClient, web_sushi_context: Context) -> None:
4747 "customer_id" : {
4848 "expression" : 'CAST("o"."customer_id" AS INT) AS "customer_id" /* this comment should not be registered */' ,
4949 "models" : {'"memory"."sushi"."orders"' : ["customer_id" ]},
50- "source" : '''WITH "current_marketing " AS (
50+ "source" : '''WITH "current_marketing_outer " AS (
5151 SELECT
5252 "marketing"."customer_id" AS "customer_id",
5353 "marketing"."status" AS "status"
@@ -58,7 +58,18 @@ def test_get_lineage(client: TestClient, web_sushi_context: Context) -> None:
5858SELECT DISTINCT
5959 CAST("o"."customer_id" AS INT) AS "customer_id" /* this comment should not be registered */
6060FROM "memory"."sushi"."orders" AS "o"
61- LEFT JOIN "current_marketing" AS "m"
61+ LEFT JOIN (
62+ WITH "current_marketing" AS (
63+ SELECT
64+ "current_marketing_outer"."customer_id" AS "customer_id",
65+ "current_marketing_outer"."status" AS "status"
66+ FROM "current_marketing_outer" AS "current_marketing_outer"
67+ )
68+ SELECT
69+ "current_marketing"."customer_id" AS "customer_id",
70+ "current_marketing"."status" AS "status"
71+ FROM "current_marketing" AS "current_marketing"
72+ ) AS "m"
6273 ON "m"."customer_id" = "o"."customer_id"
6374LEFT JOIN "memory"."raw"."demographics" AS "d"
6475 ON "d"."customer_id" = "o"."customer_id"''' ,
0 commit comments