Skip to content

Make delta writing more robust #3

@jrbourbeau

Description

@jrbourbeau

Currently we're writing every table with write_delta

etl-github/preprocess.py

Lines 160 to 170 in 1b22e30

def write_delta(tables: dict[str, pd.DataFrame]):
for table, df in tables.items():
outfile = OUTDIR / table
outfile.fs.makedirs(outfile.parent, exist_ok=True)
deltalake.write_deltalake(
outfile,
df,
mode="append",
storage_options=STORAGE_OPTIONS,
partition_by="date",
)

and using retries

futures = client.map(write_delta, futures, retries=10)

which can lead to writing multiple copies of the same table. We should rewrite things so that can't happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions