From f3ac6f53e6764dd22d4a31f9d6b2a2769df90011 Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Tue, 22 Nov 2022 11:47:17 +0100 Subject: [PATCH] Rename datatype (#8947) --- .../main/java/org/openmetadata/service/jdbi3/KpiRepository.java | 2 +- .../org/openmetadata/service/resources/kpi/KpiResourceTest.java | 2 +- .../resources/json/schema/dataInsight/dataInsightChart.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/KpiRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/KpiRepository.java index 24d5c170f15..061654d1c57 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/KpiRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/KpiRepository.java @@ -72,7 +72,7 @@ public class KpiRepository extends EntityRepository { } Map values = new HashMap<>(); for (ChartParameterValues parameterValue : dataInsightChartMetric) { - values.put(parameterValue.getName(), parameterValue.getDataType()); + values.put(parameterValue.getName(), parameterValue.getChartDataType()); } for (KpiTarget kpiTarget : kpiTargetDef) { if (!values.containsKey(kpiTarget.getName())) { diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/kpi/KpiResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/kpi/KpiResourceTest.java index 53a3909cbda..31354730d69 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/kpi/KpiResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/kpi/KpiResourceTest.java @@ -68,7 +68,7 @@ public class KpiResourceTest extends EntityResourceTest { List.of( new ChartParameterValues() .withName("Percentage") - .withDataType(DataInsightChartDataType.PERCENTAGE))); + .withChartDataType(DataInsightChartDataType.PERCENTAGE))); DI_CHART1 = dataInsightResourceTest.createAndCheckEntity(chartRequest, ADMIN_AUTH_HEADERS); DI_CHART1_REFERENCE = DI_CHART1.getEntityReference(); KPI_TARGET = new KpiTarget().withName("Percentage").withValue("80"); diff --git a/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json b/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json index 9547a2443fc..f32e0692b2e 100644 --- a/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json +++ b/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json @@ -20,7 +20,7 @@ "description": "Display Name that identifies this parameter name.", "type": "string" }, - "dataType": { + "chartDataType": { "javaType": "org.openmetadata.schema.type.DataInsightChartDataType", "description": "Data type of the parameter (int, date etc.).", "type": "string",