@@ -54,7 +54,7 @@ def to_deltalake(
54
54
mode : Literal ["error" , "append" , "overwrite" , "ignore" ] = "append" ,
55
55
dtype : dict [str , str ] | None = None ,
56
56
partition_cols : list [str ] | None = None ,
57
- overwrite_schema : bool = False ,
57
+ schema_mode : Literal [ "overwrite" ] | None = None ,
58
58
lock_dynamodb_table : str | None = None ,
59
59
s3_allow_unsafe_rename : bool = False ,
60
60
boto3_session : boto3 .Session | None = None ,
@@ -81,8 +81,8 @@ def to_deltalake(
81
81
(e.g. ``{'col name':'bigint', 'col2 name': 'int'})``
82
82
partition_cols: list[str], optional
83
83
List of columns to partition the table by. Only required when creating a new table.
84
- overwrite_schema: bool
85
- If True , allows updating the schema of the table.
84
+ schema_mode: str, optional
85
+ If set to "overwrite" , allows replacing the schema of the table. Set to "merge" to merge with existing schema .
86
86
lock_dynamodb_table: str | None
87
87
DynamoDB table to use as a locking provider.
88
88
A locking mechanism is needed to prevent unsafe concurrent writes to a delta lake directory when writing to S3.
@@ -130,6 +130,6 @@ def to_deltalake(
130
130
data = table ,
131
131
partition_by = partition_cols ,
132
132
mode = mode ,
133
- overwrite_schema = overwrite_schema ,
133
+ schema_mode = schema_mode ,
134
134
storage_options = storage_options ,
135
135
)
0 commit comments