Skip to content

Commit

Permalink
Change drop to drop if exists
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Sep 30, 2021
1 parent 93d5dd1 commit 4fa80bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def query_generator() -> Iterator[str]:
finally:
# Asynchronously clean up the uploaded Bigquery table, which will expire
# if cleanup fails
client.query(query=f"DROP TABLE {table_reference}")
client.delete_table(table=table_reference, not_found_ok=True)

return BigQueryRetrievalJob(
query=query_generator,
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def query_generator() -> Iterator[str]:
config.offline_store.cluster_id,
config.offline_store.database,
config.offline_store.user,
f"DROP TABLE {table_name}",
f"DROP TABLE IF EXISTS {table_name}",
)

return RedshiftRetrievalJob(
Expand Down

0 comments on commit 4fa80bb

Please sign in to comment.