From 5bb2924a6afaddd063bbde8652bb41d223aef5db Mon Sep 17 00:00:00 2001 From: Akash Verma <138790903+akashverma0786@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:46:01 +0530 Subject: [PATCH] Fix #16081 : Add support for SQL Server hierarchyid, geography, and geometry types (#23527) --- .../metadata/ingestion/source/database/column_type_parser.py | 2 +- ingestion/src/metadata/utils/sqa_utils.py | 3 +++ .../src/main/resources/json/schema/entity/data/table.json | 3 ++- .../resources/ui/src/generated/api/data/createContainer.ts | 1 + .../ui/src/generated/api/data/createDashboardDataModel.ts | 1 + .../resources/ui/src/generated/api/data/createDataContract.ts | 1 + .../main/resources/ui/src/generated/api/data/createTable.ts | 1 + .../resources/ui/src/generated/api/data/createWorksheet.ts | 1 + .../resources/ui/src/generated/api/mcp/mcpSearchResponse.ts | 1 + .../ui/src/generated/api/tests/createTestDefinition.ts | 1 + .../ui/src/generated/configuration/profilerConfiguration.ts | 1 + .../main/resources/ui/src/generated/entity/data/container.ts | 1 + .../ui/src/generated/entity/data/dashboardDataModel.ts | 1 + .../resources/ui/src/generated/entity/data/dataContract.ts | 1 + .../src/main/resources/ui/src/generated/entity/data/table.ts | 1 + .../main/resources/ui/src/generated/entity/data/worksheet.ts | 1 + .../metadataIngestion/storage/containerMetadataConfig.ts | 1 + .../metadataIngestion/storage/manifestMetadataConfig.ts | 1 + .../src/main/resources/ui/src/generated/settings/settings.ts | 1 + .../main/resources/ui/src/generated/tests/testDefinition.ts | 1 + 20 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/database/column_type_parser.py b/ingestion/src/metadata/ingestion/source/database/column_type_parser.py index 8a48c184b28..5b34d6af34a 100644 --- a/ingestion/src/metadata/ingestion/source/database/column_type_parser.py +++ b/ingestion/src/metadata/ingestion/source/database/column_type_parser.py @@ -293,7 +293,7 @@ class ColumnTypeParser: "STRG": "STRING", "RSTR": "STRING", # azuresql - "HIERARCHYID": "UNKNOWN", + "HIERARCHYID": "HIERARCHYID", } _COMPLEX_TYPE = re.compile("^(struct|map|array|uniontype)") diff --git a/ingestion/src/metadata/utils/sqa_utils.py b/ingestion/src/metadata/utils/sqa_utils.py index 142ca08bcb5..9fdaabf0723 100644 --- a/ingestion/src/metadata/utils/sqa_utils.py +++ b/ingestion/src/metadata/utils/sqa_utils.py @@ -274,5 +274,8 @@ def update_mssql_ischema_names(ischema_names): "sql_variant": create_sqlalchemy_type("SQL_VARIANT"), "uniqueidentifier": create_sqlalchemy_type("UUID"), "xml": create_sqlalchemy_type("XML"), + "hierarchyid": create_sqlalchemy_type("HIERARCHYID"), + "geography": create_sqlalchemy_type("GEOGRAPHY"), + "geometry": create_sqlalchemy_type("GEOMETRY"), } ) diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json index 928e9ee61c9..8574adde2b1 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json @@ -173,7 +173,8 @@ "MEASURE VISIBLE", "MEASURE", "KPI", - "HEIRARCHY" + "HEIRARCHY", + "HIERARCHYID" ] }, "constraint": { diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createContainer.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createContainer.ts index f6d600c0000..ad3a68f2c41 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createContainer.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createContainer.ts @@ -222,6 +222,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDashboardDataModel.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDashboardDataModel.ts index 0cb2c4160cb..dcfcb61762e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDashboardDataModel.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDashboardDataModel.ts @@ -190,6 +190,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDataContract.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDataContract.ts index bd3d51f5ae1..2b3b08f3fdb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDataContract.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createDataContract.ts @@ -264,6 +264,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createTable.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createTable.ts index b23d0168d35..a6450ab950f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createTable.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createTable.ts @@ -203,6 +203,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createWorksheet.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createWorksheet.ts index 62e90ca650d..5dd40255ae2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createWorksheet.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/data/createWorksheet.ts @@ -204,6 +204,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts index 77685c03b69..b0e8b9bfe5f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/mcp/mcpSearchResponse.ts @@ -238,6 +238,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts index a3a27edd4c0..3150d0224ff 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts @@ -230,6 +230,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/configuration/profilerConfiguration.ts b/openmetadata-ui/src/main/resources/ui/src/generated/configuration/profilerConfiguration.ts index b746261d3c9..6dc17e9d639 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/configuration/profilerConfiguration.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/configuration/profilerConfiguration.ts @@ -61,6 +61,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts index bef1ef6af83..9c23a14b552 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts @@ -524,6 +524,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts index 500387a3913..c34f02abf2e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts @@ -414,6 +414,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dataContract.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dataContract.ts index b8fd010b75b..f590ace7e8a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dataContract.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dataContract.ts @@ -440,6 +440,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts index 5f1894fcf55..bb2131af34c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts @@ -485,6 +485,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/worksheet.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/worksheet.ts index c8d39f71e86..cee6da5ca9d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/worksheet.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/worksheet.ts @@ -439,6 +439,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/containerMetadataConfig.ts b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/containerMetadataConfig.ts index 5ac368e1133..5c7e4d479d1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/containerMetadataConfig.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/containerMetadataConfig.ts @@ -168,6 +168,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/manifestMetadataConfig.ts b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/manifestMetadataConfig.ts index 962397d6a9b..28e7d95dddb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/manifestMetadataConfig.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/storage/manifestMetadataConfig.ts @@ -165,6 +165,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/settings/settings.ts b/openmetadata-ui/src/main/resources/ui/src/generated/settings/settings.ts index 09030f8f7ce..c5205d9587e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/settings/settings.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/settings/settings.ts @@ -1738,6 +1738,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts index 9f478b2e17e..524094a093e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts @@ -357,6 +357,7 @@ export enum DataType { Geography = "GEOGRAPHY", Geometry = "GEOMETRY", Heirarchy = "HEIRARCHY", + Hierarchyid = "HIERARCHYID", Hll = "HLL", Hllsketch = "HLLSKETCH", Image = "IMAGE",