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(python): Add example showing use of write_delta with delta_lake.WriterProperties #20746

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4420,6 +4420,21 @@ def write_delta(
... },
... ) # doctest: +SKIP

Write DataFrame as a Delta Lake table with zstd compression.
For all `delta_write_options` keyword arguments, check the deltalake docs
`here
<https://delta-io.github.io/delta-rs/api/delta_writer/#deltalake.write_deltalake>`__,
and for Writer Properties in particular `here
<https://delta-io.github.io/delta-rs/api/delta_writer/#deltalake.WriterProperties>`__.

>>> import deltalake
>>> df.write_delta(
... table_path,
... delta_write_options={
... "writer_properties": deltalake.WriterProperties(compression="zstd"),
... },
... ) # doctest: +SKIP

Merge the DataFrame with an existing Delta Lake table.
For all `TableMerger` methods, check the deltalake docs
`here <https://delta-io.github.io/delta-rs/api/delta_table/delta_table_merger/>`__.
Expand Down
Loading