Skip to content

schema_mode 'merge' | removing all other partitions #2633

Closed Answered by sherlockbeard
dataMuley asked this question in Q&A
Discussion options

You must be logged in to vote

https://delta-io.github.io/delta-rs/usage/writing/#overwriting-part-of-the-table-data-using-a-predicate

import deltalake
import pyarrow as pa


deltalake.write_deltalake(
    './temp2',
    pa.Table.from_pydict(
        {
            "x": pa.array([x for x in range(5)]),
            "y": pa.array([x for x in range(5)]),
            "z": pa.array([x for x in range(5)]),
        }
    ),
    mode='append',
    engine="rust",
    partition_by=["x"]
) 

deltalake.write_deltalake(
    './temp2',
    pa.Table.from_pydict(
        {
            "x": pa.array([x for x in range(3, 8)]),
            "t": pa.array([x for x in range(3, 8)]),
            "k": pa.array([x for x in range(3, 8)]),
      …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dataMuley
Comment options

@sherlockbeard
Comment options

Answer selected by ion-elgreco
@dataMuley
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants