From 64daf3916380597e425c16c8006a92c55f6618f7 Mon Sep 17 00:00:00 2001 From: Keshav Mohta Date: Mon, 29 Sep 2025 01:25:28 +0530 Subject: [PATCH] fix: exporter databricksConnection file --- .../databricksConnection.json | 24 ++++++--- .../external/metadataExporterAppConfig.ts | 43 +++++++++++++++- .../databricksConnection.ts | 49 +++++++++++++++++-- 3 files changed, 105 insertions(+), 11 deletions(-) diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.json b/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.json index 40529df7a6e..1a6c39f1414 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.json @@ -40,11 +40,23 @@ "description": "Host and port of the Databricks service.", "type": "string" }, - "token": { - "title": "Token", - "description": "Generated Token to connect to Databricks.", - "type": "string", - "format": "password" + "authType": { + "title": "Authentication Type", + "description": "Choose between different authentication types for Databricks.", + "oneOf": [ + { + "title": "Personal Access Token", + "$ref": "../../../../services/connections/database/databricks/personalAccessToken.json" + }, + { + "title": "Databricks OAuth", + "$ref": "../../../../services/connections/database/databricks/databricksOAuth.json" + }, + { + "title": "Azure AD Setup", + "$ref": "../../../../services/connections/database/databricks/azureAdSetup.json" + } + ] }, "httpPath": { "title": "Http Path", @@ -79,7 +91,7 @@ "additionalProperties": false, "required": [ "hostPort", - "token", + "authType", "httpPath" ] } \ No newline at end of file diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterAppConfig.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterAppConfig.ts index dac82eda9a8..767645a7a18 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterAppConfig.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterAppConfig.ts @@ -106,6 +106,10 @@ export interface Connection { * Snowflake warehouse. */ warehouse?: string; + /** + * Choose between different authentication types for Databricks. + */ + authType?: AuthenticationType; /** * Catalog of the data source(Example: hive_metastore). This is optional parameter, if you * would like to restrict the metadata reading to a single catalog. When left blank, @@ -132,10 +136,47 @@ export interface Connection { * Databricks compute resources URL. */ httpPath?: string; +} + +/** + * Choose between different authentication types for Databricks. + * + * Personal Access Token authentication for Databricks. + * + * OAuth2 Machine-to-Machine authentication using Service Principal credentials for + * Databricks. + * + * Azure Active Directory authentication for Azure Databricks workspaces using Service + * Principal. + */ +export interface AuthenticationType { /** - * Generated Token to connect to Databricks. + * Generated Personal Access Token for Databricks workspace authentication. This token is + * created from User Settings -> Developer -> Access Tokens in your Databricks workspace. */ token?: string; + /** + * Service Principal Application ID created in your Databricks Account Console for OAuth + * Machine-to-Machine authentication. + */ + clientId?: string; + /** + * OAuth Secret generated for the Service Principal in Databricks Account Console. Used for + * secure OAuth2 authentication. + */ + clientSecret?: string; + /** + * Azure Service Principal Application (client) ID registered in your Azure Active Directory. + */ + azureClientId?: string; + /** + * Azure Service Principal client secret created in Azure AD for authentication. + */ + azureClientSecret?: string; + /** + * Azure Active Directory Tenant ID where your Service Principal is registered. + */ + azureTenantId?: string; } /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.ts index 2d8a25b74e0..abdaf97ba7b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterConnectors/databricksConnection.ts @@ -14,6 +14,10 @@ * Databricks Connection Config */ export interface DatabricksConnection { + /** + * Choose between different authentication types for Databricks. + */ + authType: AuthenticationType; /** * Catalog of the data source(Example: hive_metastore). This is optional parameter, if you * would like to restrict the metadata reading to a single catalog. When left blank, @@ -46,16 +50,53 @@ export interface DatabricksConnection { * SQLAlchemy driver scheme options. */ scheme?: DatabricksScheme; - /** - * Generated Token to connect to Databricks. - */ - token: string; /** * Service Type */ type?: DatabricksType; } +/** + * Choose between different authentication types for Databricks. + * + * Personal Access Token authentication for Databricks. + * + * OAuth2 Machine-to-Machine authentication using Service Principal credentials for + * Databricks. + * + * Azure Active Directory authentication for Azure Databricks workspaces using Service + * Principal. + */ +export interface AuthenticationType { + /** + * Generated Personal Access Token for Databricks workspace authentication. This token is + * created from User Settings -> Developer -> Access Tokens in your Databricks workspace. + */ + token?: string; + /** + * Service Principal Application ID created in your Databricks Account Console for OAuth + * Machine-to-Machine authentication. + */ + clientId?: string; + /** + * OAuth Secret generated for the Service Principal in Databricks Account Console. Used for + * secure OAuth2 authentication. + */ + clientSecret?: string; + /** + * Azure Service Principal Application (client) ID registered in your Azure Active Directory. + */ + azureClientId?: string; + /** + * Azure Service Principal client secret created in Azure AD for authentication. + */ + azureClientSecret?: string; + /** + * Azure Active Directory Tenant ID where your Service Principal is registered. + */ + azureTenantId?: string; +} + /** * SQLAlchemy driver scheme options. */