From a26d0e04c7a0e91c13cb22e217d315aecdcae67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Serra?= Date: Thu, 21 Oct 2021 10:55:13 +0200 Subject: [PATCH 1/3] fixes #1958 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Serra --- sdk/python/feast/infra/offline_stores/bigquery.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index 0a8c61a02b9..2107927c342 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -133,7 +133,7 @@ def get_historical_features( assert isinstance(config.offline_store, BigQueryOfflineStoreConfig) table_reference = _get_table_reference_for_new_entity( - client, client.project, config.offline_store.dataset + client, client.project, config.offline_store.dataset, config.offline_store.location ) @contextlib.contextmanager @@ -332,13 +332,13 @@ def _wait_until_done(bq_job): def _get_table_reference_for_new_entity( - client: Client, dataset_project: str, dataset_name: str + client: Client, dataset_project: str, dataset_name: str, dataset_location: str ) -> str: """Gets the table_id for the new entity to be uploaded.""" # First create the BigQuery dataset if it doesn't exist dataset = bigquery.Dataset(f"{dataset_project}.{dataset_name}") - dataset.location = "US" + dataset.location = dataset_location try: client.get_dataset(dataset) From 67e23bcd731da554e9f5c49f8e3645a3a0a7fe36 Mon Sep 17 00:00:00 2001 From: Achal Shah Date: Thu, 18 Nov 2021 10:32:14 -0800 Subject: [PATCH 2/3] Fix lint Signed-off-by: Achal Shah --- README.md | 18 +++++++++++------- .../feast/infra/offline_stores/bigquery.py | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 91f87b52ed4..c5b1f8a48e6 100644 --- a/README.md +++ b/README.md @@ -137,28 +137,32 @@ The list below contains the functionality that contributors are planning to deve * [x] [Redshift source](https://docs.feast.dev/reference/data-sources/redshift) * [x] [BigQuery source](https://docs.feast.dev/reference/data-sources/bigquery) * [x] [Parquet file source](https://docs.feast.dev/reference/data-sources/file) + * [x] [Synapse source (community plugin)](https://github.com/Azure/feast-azure) + * [x] [Hive (community plugin)](https://github.com/baineng/feast-hive) + * [x] [Postgres (community plugin)](https://github.com/nossrannug/feast-postgres) * [ ] Kafka source (Planned for Q4 2021) - * [ ] Synapse source (Planned for Q4 2021) * [ ] Snowflake source (Planned for Q4 2021) * [ ] HTTP source * **Offline Stores** * [x] [Redshift](https://docs.feast.dev/reference/offline-stores/redshift) * [x] [BigQuery](https://docs.feast.dev/reference/offline-stores/bigquery) + * [x] [Synapse (community plugin)](https://github.com/Azure/feast-azure) + * [x] [Hive (community plugin)](https://github.com/baineng/feast-hive) + * [x] [Postgres (community plugin)](https://github.com/nossrannug/feast-postgres) * [x] [In-memory / Pandas](https://docs.feast.dev/reference/offline-stores/file) * [x] [Custom offline store support](https://docs.feast.dev/how-to-guides/adding-a-new-offline-store) - * [x] [Hive (community maintained)](https://github.com/baineng/feast-hive) - * [x] [Postgres (community maintained)](https://github.com/nossrannug/feast-postgres) * [ ] Snowflake (Planned for Q4 2021) - * [ ] Synapse (Planned for Q4 2021) + * [ ] Trino (Planned for Q4 2021) * **Online Stores** * [x] [DynamoDB](https://docs.feast.dev/reference/online-stores/dynamodb) * [x] [Redis](https://docs.feast.dev/reference/online-stores/redis) * [x] [Datastore](https://docs.feast.dev/reference/online-stores/datastore) * [x] [SQLite](https://docs.feast.dev/reference/online-stores/sqlite) + * [x] [Azure Cache for Redis (community plugin)](https://github.com/Azure/feast-azure) + * [x] [Postgres (community plugin)](https://github.com/nossrannug/feast-postgres) * [x] [Custom online store support](https://docs.feast.dev/how-to-guides/adding-support-for-a-new-online-store) - * [x] [Postgres (community maintained)](https://github.com/nossrannug/feast-postgres) * [ ] Bigtable - * [ ] Cassandra\\ + * [ ] Cassandra * **Streaming** * [x] [Custom streaming ingestion job support](https://docs.feast.dev/how-to-guides/creating-a-custom-provider) * [ ] Streaming ingestion on AWS (Planned for Q4 2021) @@ -171,7 +175,7 @@ The list below contains the functionality that contributors are planning to deve * [x] AWS Lambda (Alpha release. See [RFC](https://docs.google.com/document/d/1eZWKWzfBif66LDN32IajpaG-j82LSHCCOzY6R7Ax7MI/edit)) * [ ] Cloud Run * [ ] Kubernetes - * [ ] KNative\\ + * [ ] KNative * **Feature Serving** * [x] Python Client * [x] REST Feature Server (Python) (Alpha release. See [RFC](https://docs.google.com/document/d/1iXvFhAsJ5jgAhPOpTdB3j-Wj1S9x3Ev\_Wr6ZpnLzER4/edit)) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index 2107927c342..788e62d1f5e 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -332,13 +332,13 @@ def _wait_until_done(bq_job): def _get_table_reference_for_new_entity( - client: Client, dataset_project: str, dataset_name: str, dataset_location: str + client: Client, dataset_project: str, dataset_name: str, dataset_location: Optional[str] ) -> str: """Gets the table_id for the new entity to be uploaded.""" # First create the BigQuery dataset if it doesn't exist dataset = bigquery.Dataset(f"{dataset_project}.{dataset_name}") - dataset.location = dataset_location + dataset.location = dataset_location if dataset_location else "US" try: client.get_dataset(dataset) From b199e778cf2292b61dc06db15cd0fd99b2349342 Mon Sep 17 00:00:00 2001 From: Achal Shah Date: Thu, 18 Nov 2021 10:33:14 -0800 Subject: [PATCH 3/3] Fix lint Signed-off-by: Achal Shah --- sdk/python/feast/infra/offline_stores/bigquery.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index 788e62d1f5e..003e73a139f 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -133,7 +133,10 @@ def get_historical_features( assert isinstance(config.offline_store, BigQueryOfflineStoreConfig) table_reference = _get_table_reference_for_new_entity( - client, client.project, config.offline_store.dataset, config.offline_store.location + client, + client.project, + config.offline_store.dataset, + config.offline_store.location, ) @contextlib.contextmanager @@ -332,7 +335,10 @@ def _wait_until_done(bq_job): def _get_table_reference_for_new_entity( - client: Client, dataset_project: str, dataset_name: str, dataset_location: Optional[str] + client: Client, + dataset_project: str, + dataset_name: str, + dataset_location: Optional[str], ) -> str: """Gets the table_id for the new entity to be uploaded."""