File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
sqlmesh/core/engine_adapter
tests/core/engine_adapter Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -811,9 +811,9 @@ def scd_type_2(
811811 exp .Select () # type: ignore
812812 .with_ (
813813 "source" ,
814- exp .select (* unmanaged_columns )
815- . distinct ( * unique_key )
816- . from_ ( source_table . subquery ( "raw_source" )), # type: ignore
814+ exp .select (* unmanaged_columns ). from_ (
815+ source_table . subquery ( "raw_source" ) # type: ignore
816+ ),
817817 )
818818 # Historical Records that Do Not Change
819819 .with_ (
@@ -1099,6 +1099,8 @@ def execute(
10991099 if isinstance (e , exp .Expression )
11001100 else e
11011101 )
1102+ logger .error ("THE SQL: %s" , sql )
1103+ print (sql )
11021104 logger .debug (f"Executing SQL:\n { sql } " )
11031105 self .cursor .execute (sql , ** kwargs )
11041106
Original file line number Diff line number Diff line change @@ -732,7 +732,7 @@ def test_scd_type_2(make_mocked_engine_adapter: t.Callable):
732732 """
733733CREATE OR REPLACE TABLE "target" AS
734734WITH "source" AS (
735- SELECT DISTINCT ON ("id")
735+ SELECT
736736 "id",
737737 "name",
738738 "price",
@@ -884,7 +884,7 @@ def test_merge_scd_type_2_pandas(make_mocked_engine_adapter: t.Callable):
884884 """
885885CREATE OR REPLACE TABLE "target" AS
886886WITH "source" AS (
887- SELECT DISTINCT ON ("id1", "id2")
887+ SELECT
888888 "id1",
889889 "id2",
890890 "name",
You can’t perform that action at this time.
0 commit comments