Skip to content

Commit

Permalink
Add schema_mode to deltalake format (adapt for deltalake>0.16)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailhammounou committed Mar 16, 2024
1 parent 6a7d5a4 commit b23015d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/db2ixf/ixf.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ def to_deltalake(
partition_by: Optional[Union[List[str], str]] = None,
mode: Literal["error", "append", "overwrite", "ignore"] = "error",
overwrite_schema: bool = False,
schema_mode: Optional[Literal["merge", "overwrite"]] = None,
partition_filters: Optional[List[Tuple[str, str, Any]]] = None,
large_dtypes: bool = False,
batch_size: Optional[int] = None,
Expand All @@ -977,6 +978,9 @@ def to_deltalake(
If "ignore", will not write anything if table already exists.
overwrite_schema : bool
If True, allows updating the schema of the table.
schema_mode : Optional[Literal["merge", "overwrite"]]
If set to "overwrite", allows replacing the schema of the table.
Set to "merge" to merge with existing schema.
partition_filters : Optional[List[Tuple[str, str, Any]]]
Defaults to None. The partition filters that will be used for
partition overwrite. Only used in pyarrow engine.
Expand Down Expand Up @@ -1011,6 +1015,7 @@ def to_deltalake(
partition_by=partition_by,
mode=mode,
overwrite_schema=overwrite_schema,
schema_mode=schema_mode,
partition_filters=partition_filters,
large_dtypes=large_dtypes,
**kwargs
Expand Down

0 comments on commit b23015d

Please sign in to comment.