From c7fe4f896833d93cd010d036fd330d30f4d449fc Mon Sep 17 00:00:00 2001 From: pmbrull Date: Mon, 18 Apr 2022 16:45:33 +0200 Subject: [PATCH] Add dashboard required fields --- .../services/connections/dashboard/lookerConnection.json | 3 ++- .../connections/dashboard/metabaseConnection.json | 6 +++++- .../connections/dashboard/powerBIConnection.json | 9 +++++++-- .../services/connections/dashboard/redashConnection.json | 9 +++++++-- .../connections/dashboard/supersetConnection.json | 6 +++++- .../connections/dashboard/tableauConnection.json | 6 +++++- ingestion/examples/workflows/powerbi.json | 2 +- ingestion/examples/workflows/redash.json | 5 +++-- ingestion/tests/unit/source/test_source_parsing.py | 5 +++-- 9 files changed, 38 insertions(+), 13 deletions(-) diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/lookerConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/lookerConnection.json index 422770eeddc..95390706e7d 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/lookerConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/lookerConnection.json @@ -41,5 +41,6 @@ "$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction" } }, - "additionalProperties": false + "additionalProperties": false, + "required": ["hostPort", "username"] } diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/metabaseConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/metabaseConnection.json index 954edda652a..029944920a5 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/metabaseConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/metabaseConnection.json @@ -40,5 +40,9 @@ "$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "hostPort", + "username" + ] } diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/powerBIConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/powerBIConnection.json index fa52601248b..7792957ab69 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/powerBIConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/powerBIConnection.json @@ -36,7 +36,7 @@ "description": "Dashboard redirect URI for the PowerBI.", "type": "string" }, - "dashboardURL": { + "hostPort": { "description": "Dashboard URL for the power BI.", "type": "string", "format": "uri", @@ -54,5 +54,10 @@ "$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "hostPort", + "clientId", + "clientSecret" + ] } diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/redashConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/redashConnection.json index 93f23a4e589..f0f82911d81 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/redashConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/redashConnection.json @@ -23,7 +23,7 @@ "description": "username for the Redash", "type": "string" }, - "redashURL": { + "hostPort": { "description": "URL for the redash instance", "type": "string", "format": "uri", @@ -37,5 +37,10 @@ "$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "hostPort", + "username", + "apiKey" + ] } diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json index 098ff29c72b..72cc390e7d5 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json @@ -52,5 +52,9 @@ "$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "hostPort", + "username" + ] } diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json index 2dffa71fdfc..e1f4683845e 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json @@ -57,5 +57,9 @@ "$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "hostPort", + "username" + ] } diff --git a/ingestion/examples/workflows/powerbi.json b/ingestion/examples/workflows/powerbi.json index c8c8cc29194..f4416ad67e7 100644 --- a/ingestion/examples/workflows/powerbi.json +++ b/ingestion/examples/workflows/powerbi.json @@ -7,7 +7,7 @@ "clientId": "client_id", "clientSecret": "client_secret", "redirectURI": "http://localhost:8585/callback", - "dashboardURL": "https://analysis.windows.net/powerbi", + "hostPort": "https://analysis.windows.net/powerbi", "scope": [ "scope", "https://analysis.windows.net/powerbi/api/App.Read.All" diff --git a/ingestion/examples/workflows/redash.json b/ingestion/examples/workflows/redash.json index 5c4faacbc75..03d53154700 100644 --- a/ingestion/examples/workflows/redash.json +++ b/ingestion/examples/workflows/redash.json @@ -5,8 +5,9 @@ "serviceConnection": { "config": { "type": "Redash", - "redashURL": "http://localhost:5000", - "apiKey": "api_key" + "hostPort": "http://localhost:5000", + "apiKey": "api_key", + "username": "random" } }, "sourceConfig": { diff --git a/ingestion/tests/unit/source/test_source_parsing.py b/ingestion/tests/unit/source/test_source_parsing.py index 9aeb9647f61..e18b9a79229 100644 --- a/ingestion/tests/unit/source/test_source_parsing.py +++ b/ingestion/tests/unit/source/test_source_parsing.py @@ -546,7 +546,7 @@ def test_powerbi(): "clientId": "client_id", "clientSecret": "client_secret", "redirectURI": "http://localhost:8585/callback", - "dashboardURL": "https://analysis.windows.net/powerbi", + "hostPort": "https://analysis.windows.net/powerbi", "scope": [ "scope", "https://analysis.windows.net/powerbi/api/App.Read.All", @@ -590,7 +590,8 @@ def test_redash(): "serviceConnection": { "config": { "type": "Redash", - "redashURL": "http://localhost:5000", + "hostPort": "http://localhost:5000", + "username": "random", "apiKey": "api_key", } },