@@ -1526,6 +1526,7 @@ def append(
15261526 self .adapter .insert_append (
15271527 table_name ,
15281528 query_or_df ,
1529+ target_columns_to_types = model .columns_to_types ,
15291530 )
15301531
15311532 def create (
@@ -1666,7 +1667,27 @@ def _get_target_and_source_columns(
16661667 return target_column_to_types , source_columns
16671668
16681669
1669- class IncrementalByPartitionStrategy (MaterializableStrategy ):
1670+ class IncrementalStrategy (MaterializableStrategy , abc .ABC ):
1671+ def append (
1672+ self ,
1673+ table_name : str ,
1674+ query_or_df : QueryOrDF ,
1675+ model : Model ,
1676+ render_kwargs : t .Dict [str , t .Any ],
1677+ ** kwargs : t .Any ,
1678+ ) -> None :
1679+ columns_to_types , source_columns = self ._get_target_and_source_columns (
1680+ model , table_name , render_kwargs = render_kwargs
1681+ )
1682+ self .adapter .insert_append (
1683+ table_name ,
1684+ query_or_df ,
1685+ target_columns_to_types = columns_to_types ,
1686+ source_columns = source_columns ,
1687+ )
1688+
1689+
1690+ class IncrementalByPartitionStrategy (IncrementalStrategy ):
16701691 def insert (
16711692 self ,
16721693 table_name : str ,
@@ -1691,7 +1712,7 @@ def insert(
16911712 )
16921713
16931714
1694- class IncrementalByTimeRangeStrategy (MaterializableStrategy ):
1715+ class IncrementalByTimeRangeStrategy (IncrementalStrategy ):
16951716 def insert (
16961717 self ,
16971718 table_name : str ,
@@ -1716,7 +1737,7 @@ def insert(
17161737 )
17171738
17181739
1719- class IncrementalByUniqueKeyStrategy (MaterializableStrategy ):
1740+ class IncrementalByUniqueKeyStrategy (IncrementalStrategy ):
17201741 def insert (
17211742 self ,
17221743 table_name : str ,
@@ -1776,7 +1797,7 @@ def append(
17761797 )
17771798
17781799
1779- class IncrementalUnmanagedStrategy (MaterializableStrategy ):
1800+ class IncrementalUnmanagedStrategy (IncrementalStrategy ):
17801801 def append (
17811802 self ,
17821803 table_name : str ,
@@ -1894,7 +1915,7 @@ def insert(
18941915 pass
18951916
18961917
1897- class SCDType2Strategy (MaterializableStrategy ):
1918+ class SCDType2Strategy (IncrementalStrategy ):
18981919 def create (
18991920 self ,
19001921 table_name : str ,
0 commit comments