dataconvert updates
This commit is contained in:
@@ -29,6 +29,9 @@ def write_tables(dfs: dict, out_dir: Path, source_name: str, max_rows=None, repo
|
||||
filename = table_filename(raw_name, source_name, len(dfs), bare_prefixes)
|
||||
sql, total, full_bytes, exact = render_table(df, table, max_rows)
|
||||
out_file = out_dir / filename
|
||||
# Created on the first file, so a run that finds nothing to convert
|
||||
# leaves no empty directory behind.
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Several sources can feed the same table; they accumulate in one file.
|
||||
mode = "a" if out_file.exists() else "w"
|
||||
|
||||
Reference in New Issue
Block a user