Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lostmygithubaccount committed Sep 7, 2024
1 parent 04bd4bd commit 77d766d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ibis_analytics/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def read_table(table_name: str) -> ibis.Table:
else:
table_path = delta_table_path(table_name)

return ibis.read_delta(table_path)
# TODO: remove parquet hack once https://github.com/delta-io/delta-rs/issues/2859 fixed
return ibis.read_parquet(f"{table_path}/data.parquet")


def write_table(t: ibis.Table, table_name: str) -> None:
Expand All @@ -45,10 +46,12 @@ def write_table(t: ibis.Table, table_name: str) -> None:
else:
table_path = delta_table_path(table_name)

t.to_delta(
table_path,
mode="overwrite",
partition_by=["extracted_at"],
# TODO: remove parquet hack once https://github.com/delta-io/delta-rs/issues/2859 fixed
t.to_parquet(
f"{table_path}/data.parquet",
overwrite=True,
# mode="overwrite",
# partition_by=["extracted_at"],
)


Expand Down

0 comments on commit 77d766d

Please sign in to comment.