Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix docstring of set_table_properties #2820

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion python/deltalake/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1903,12 +1903,27 @@ def set_table_properties(
custom_metadata: Optional[Dict[str, str]] = None,
) -> None:
"""
Unset properties from the table.
Set properties from the table.

Args:
properties: properties which set
raise_if_not_exists: set if should raise if not exists.
custom_metadata: custom metadata that will be added to the transaction commit.

Example:
```python
from deltalake import write_deltalake, DeltaTable
import pandas as pd
df = pd.DataFrame(
{"id": ["1", "2", "3"],
"deleted": [False, False, False],
"price": [10., 15., 20.]
})
write_deltalake("tmp", df)

dt = DeltaTable("tmp")
dt.alter.set_table_properties({"delta.enableChangeDataFeed": "true"})
```
"""
self.table._table.set_table_properties(
properties, raise_if_not_exists, custom_metadata
Expand Down
Loading