Skip to content

Commit

Permalink
fix: Make generated temp table name escaped (#3797)
Browse files Browse the repository at this point in the history
* Fix critical issue with saving results in BigQuery

Need to encapsulate table path as tmp table path can contain symbols that can't be process by BigQuery without encapsulation

Signed-off-by: Dmytro Miedviediev <beardimon2001@gmail.com>

* update numpy

Signed-off-by: Dmytro Miedviediev <beardimon2001@gmail.com>

* revert numpy version

Signed-off-by: Dmytro Miedviediev <beardimon2001@gmail.com>

---------

Signed-off-by: Dmytro Miedviediev <beardimon2001@gmail.com>
  • Loading branch information
BearDimonR committed Oct 20, 2023
1 parent 7376db8 commit 175d796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Expand Up @@ -515,7 +515,7 @@ def to_bigquery(
temp_dest_table = f"{tmp_dest['projectId']}.{tmp_dest['datasetId']}.{tmp_dest['tableId']}"

# persist temp table
sql = f"CREATE TABLE `{dest}` AS SELECT * FROM {temp_dest_table}"
sql = f"CREATE TABLE `{dest}` AS SELECT * FROM `{temp_dest_table}`"
self._execute_query(sql, timeout=timeout)

print(f"Done writing to '{dest}'.")
Expand Down

0 comments on commit 175d796

Please sign in to comment.