-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Expected Behavior
I expect get_historical_features to work even if the project name is not correctly detected by BigQuery without enclosing it in backtick.
Current Behavior
Some project names can cause the get_historical_features to fail because the create statement in _upload_entity_df
code
job = client.query(f"CREATE TABLE {table_name} AS ({entity_df})")
does not enclose the table_name in backtick
We currently have the issue with a GCP project name that is suffixed by -12c1
The relevant error on BigQuery is
Syntax error: Missing whitespace between literal and alias at [1:28]
Steps to reproduce
- Create a GCP project with a suffix that must be backticked in BigQuery (e.g
dummy-project-12c1) - Attempt to run a
get_historical_features
Specifications
- Version: 0.22
- Platform: Linux
- Subsystem: Ubuntu 20.04
Possible Solution
I think the best solution is to add the backticks around the table_name
job = client.query(f"CREATE TABLE `{table_name}` AS ({entity_df})")