From e20f75fa54a6eb9a9fd2255e2518a9aebda82f59 Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Mon, 8 May 2023 14:02:17 +0530 Subject: [PATCH] Fix #11468: Fix salesforce scheme issue (#11474) --- .../ingestion/source/database/salesforce/metadata.py | 5 +++-- .../services/connections/database/salesforceConnection.md | 2 -- .../services/connections/database/salesforceConnection.md | 2 -- .../services/connections/database/salesforceConnection.md | 3 --- .../services/connections/database/salesforceConnection.md | 2 -- .../services/connections/database/salesforceConnection.json | 6 ------ 6 files changed, 3 insertions(+), 17 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/database/salesforce/metadata.py b/ingestion/src/metadata/ingestion/source/database/salesforce/metadata.py index 420dd964ace8..ca84b70ca6b4 100644 --- a/ingestion/src/metadata/ingestion/source/database/salesforce/metadata.py +++ b/ingestion/src/metadata/ingestion/source/database/salesforce/metadata.py @@ -51,6 +51,8 @@ logger = ingestion_logger() +SALESFORCE_DEFAULT_SCHEMA = "salesforce" + class SalesforceSource(DatabaseServiceSource): """ @@ -109,8 +111,7 @@ def get_database_schema_names(self) -> Iterable[str]: """ return schema names """ - schema_name = self.service_connection.scheme.name - yield schema_name + yield SALESFORCE_DEFAULT_SCHEMA def yield_database_schema( self, schema_name: str diff --git a/openmetadata-docs-v1/content/v0.13.2/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md b/openmetadata-docs-v1/content/v0.13.2/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md index b49bb10fdc2b..048fa1a2aba7 100644 --- a/openmetadata-docs-v1/content/v0.13.2/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md +++ b/openmetadata-docs-v1/content/v0.13.2/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md @@ -10,7 +10,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Properties - **`type`**: Service Type. Refer to *#/definitions/salesforceType*. Default: `Salesforce`. -- **`scheme`**: SQLAlchemy driver scheme options. Refer to *#/definitions/salesforceScheme*. Default: `salesforce`. - **`username`** *(string)*: Username to connect to the Salesforce. This user should have privileges to read all the metadata in Redshift. - **`password`** *(string)*: Password to connect to the Salesforce. - **`securityToken`** *(string)*: Salesforce Security Token. @@ -23,7 +22,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Definitions - **`salesforceType`** *(string)*: Service type. Must be one of: `['Salesforce']`. Default: `Salesforce`. -- **`salesforceScheme`** *(string)*: SQLAlchemy driver scheme options. Must be one of: `['salesforce']`. Default: `salesforce`. Documentation file automatically generated at 2022-07-14 10:51:34.749986. diff --git a/openmetadata-docs-v1/content/v0.13.3/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md b/openmetadata-docs-v1/content/v0.13.3/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md index b49bb10fdc2b..048fa1a2aba7 100644 --- a/openmetadata-docs-v1/content/v0.13.3/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md +++ b/openmetadata-docs-v1/content/v0.13.3/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md @@ -10,7 +10,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Properties - **`type`**: Service Type. Refer to *#/definitions/salesforceType*. Default: `Salesforce`. -- **`scheme`**: SQLAlchemy driver scheme options. Refer to *#/definitions/salesforceScheme*. Default: `salesforce`. - **`username`** *(string)*: Username to connect to the Salesforce. This user should have privileges to read all the metadata in Redshift. - **`password`** *(string)*: Password to connect to the Salesforce. - **`securityToken`** *(string)*: Salesforce Security Token. @@ -23,7 +22,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Definitions - **`salesforceType`** *(string)*: Service type. Must be one of: `['Salesforce']`. Default: `Salesforce`. -- **`salesforceScheme`** *(string)*: SQLAlchemy driver scheme options. Must be one of: `['salesforce']`. Default: `salesforce`. Documentation file automatically generated at 2022-07-14 10:51:34.749986. diff --git a/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md b/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md index b49bb10fdc2b..04efc832cca1 100644 --- a/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md +++ b/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md @@ -10,7 +10,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Properties - **`type`**: Service Type. Refer to *#/definitions/salesforceType*. Default: `Salesforce`. -- **`scheme`**: SQLAlchemy driver scheme options. Refer to *#/definitions/salesforceScheme*. Default: `salesforce`. - **`username`** *(string)*: Username to connect to the Salesforce. This user should have privileges to read all the metadata in Redshift. - **`password`** *(string)*: Password to connect to the Salesforce. - **`securityToken`** *(string)*: Salesforce Security Token. @@ -23,7 +22,5 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Definitions - **`salesforceType`** *(string)*: Service type. Must be one of: `['Salesforce']`. Default: `Salesforce`. -- **`salesforceScheme`** *(string)*: SQLAlchemy driver scheme options. Must be one of: `['salesforce']`. Default: `salesforce`. - Documentation file automatically generated at 2022-07-14 10:51:34.749986. diff --git a/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md b/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md index b49bb10fdc2b..048fa1a2aba7 100644 --- a/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md +++ b/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/salesforceConnection.md @@ -10,7 +10,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Properties - **`type`**: Service Type. Refer to *#/definitions/salesforceType*. Default: `Salesforce`. -- **`scheme`**: SQLAlchemy driver scheme options. Refer to *#/definitions/salesforceScheme*. Default: `salesforce`. - **`username`** *(string)*: Username to connect to the Salesforce. This user should have privileges to read all the metadata in Redshift. - **`password`** *(string)*: Password to connect to the Salesforce. - **`securityToken`** *(string)*: Salesforce Security Token. @@ -23,7 +22,6 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab ## Definitions - **`salesforceType`** *(string)*: Service type. Must be one of: `['Salesforce']`. Default: `Salesforce`. -- **`salesforceScheme`** *(string)*: SQLAlchemy driver scheme options. Must be one of: `['salesforce']`. Default: `salesforce`. Documentation file automatically generated at 2022-07-14 10:51:34.749986. diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/salesforceConnection.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/salesforceConnection.json index fe027a448dbb..3082ba5c705f 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/salesforceConnection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/salesforceConnection.json @@ -11,12 +11,6 @@ "type": "string", "enum": ["Salesforce"], "default": "Salesforce" - }, - "salesforceScheme": { - "description": "SQLAlchemy driver scheme options.", - "type": "string", - "enum": ["salesforce"], - "default": "salesforce" } }, "properties": {