From 128e4e8e93b12eea00827f3fd7f6ee396275b49a Mon Sep 17 00:00:00 2001 From: IceS2 Date: Wed, 13 Nov 2024 16:14:56 +0100 Subject: [PATCH] MINOR: Fix App Insights not processing URL Encoded Data Assets (#18613) * use 'URLDecoder.decode' before getting entity by name * Update Test to cover this scenario --- .../processors/WebAnalyticsEntityViewProcessor.java | 2 +- .../openmetadata/service/resources/apps/AppsResourceTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/workflows/webAnalytics/processors/WebAnalyticsEntityViewProcessor.java b/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/workflows/webAnalytics/processors/WebAnalyticsEntityViewProcessor.java index 6b67cfc78f6..10db85b432f 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/workflows/webAnalytics/processors/WebAnalyticsEntityViewProcessor.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/workflows/webAnalytics/processors/WebAnalyticsEntityViewProcessor.java @@ -99,7 +99,7 @@ public class WebAnalyticsEntityViewProcessor EntityInterface entity = Entity.getEntityByName( URLDecoder.decode(entityType, StandardCharsets.UTF_8), - entityFqn, + URLDecoder.decode(entityFqn, StandardCharsets.UTF_8), "*", Include.NON_DELETED, true); diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/apps/AppsResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/apps/AppsResourceTest.java index 577c162e072..e14532595c7 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/apps/AppsResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/apps/AppsResourceTest.java @@ -140,7 +140,7 @@ public class AppsResourceTest extends EntityResourceTest { DatabaseService databaseService = databaseServiceResourceTest.createEntity( databaseServiceResourceTest - .createRequest("DI_Test_Snowflake") + .createRequest("DI Test Snowflake") .withServiceType(CreateDatabaseService.DatabaseServiceType.Snowflake), ADMIN_AUTH_HEADERS);