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

Make delta writing more robust #3

Open
jrbourbeau opened this issue Mar 1, 2024 · 0 comments
Open

Make delta writing more robust #3

jrbourbeau opened this issue Mar 1, 2024 · 0 comments

Comments

@jrbourbeau
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant