This is an automated email from the ASF dual-hosted git repository.
pankajkoti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 5ed74bf835 Update the connection for pinecone provider (#35523)
5ed74bf835 is described below
commit 5ed74bf835d09250cd1baf9e04e05883fe0a211b
Author: Utkarsh Sharma <[email protected]>
AuthorDate: Wed Nov 8 14:04:02 2023 +0530
Update the connection for pinecone provider (#35523)
Pinecone client uses the Project ID instead of Project Name,
this commit updates the Pinecone connection to use Project ID.
---
airflow/providers/pinecone/hooks/pinecone.py | 8 ++++----
docs/apache-airflow-providers-pinecone/connections.rst | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/airflow/providers/pinecone/hooks/pinecone.py
b/airflow/providers/pinecone/hooks/pinecone.py
index 9f6054ffe1..d4fcd70400 100644
--- a/airflow/providers/pinecone/hooks/pinecone.py
+++ b/airflow/providers/pinecone/hooks/pinecone.py
@@ -52,8 +52,8 @@ class PineconeHook(BaseHook):
return {
"log_level": StringField(lazy_gettext("Log Level"),
widget=BS3TextFieldWidget(), default=None),
- "project_name": StringField(
- lazy_gettext("Project Name"),
+ "project_id": StringField(
+ lazy_gettext("Project ID"),
widget=BS3TextFieldWidget(),
),
}
@@ -76,13 +76,13 @@ class PineconeHook(BaseHook):
pinecone_environment = pinecone_connection.login
pinecone_host = pinecone_connection.host
extras = pinecone_connection.extra_dejson
- pinecone_project_name = extras.get("project_name")
+ pinecone_project_id = extras.get("project_id")
log_level = extras.get("log_level", None)
pinecone.init(
api_key=api_key,
environment=pinecone_environment,
host=pinecone_host,
- project_name=pinecone_project_name,
+ project_name=pinecone_project_id,
log_level=log_level,
)
diff --git a/docs/apache-airflow-providers-pinecone/connections.rst
b/docs/apache-airflow-providers-pinecone/connections.rst
index 0e7f94b414..07054a9388 100644
--- a/docs/apache-airflow-providers-pinecone/connections.rst
+++ b/docs/apache-airflow-providers-pinecone/connections.rst
@@ -39,5 +39,5 @@ Pinecone Environment (required)
Pinecone API key (required)
Specify your Pinecone API Key to connect.
-Project Name (required)
- Project Name corresponding to your API Key.
+Project ID (required)
+ Project ID corresponding to your API Key.