From a0dd821bd1896b5fd67d07792b393e5bb2eca4cb Mon Sep 17 00:00:00 2001 From: vanshika18 <52087403+vanshika18@users.noreply.github.com> Date: Sun, 30 Jul 2023 00:57:05 +0530 Subject: [PATCH] Support SingleStore metadata ingestion (JSON type fields) (#12623) * Support SingleStore metadata ingestion (JSON type fields) * Removing Collate Keyword all datatypes --------- Co-authored-by: Vanshika Kabra Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> --- .../src/metadata/ingestion/source/database/mysql/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/database/mysql/utils.py b/ingestion/src/metadata/ingestion/source/database/mysql/utils.py index 622da009666b..7c08600070fa 100644 --- a/ingestion/src/metadata/ingestion/source/database/mysql/utils.py +++ b/ingestion/src/metadata/ingestion/source/database/mysql/utils.py @@ -65,7 +65,7 @@ def parse_column(self, line, state): name, type_, args = spec["name"], spec["coltype"], spec["arg"] try: - col_type = self.dialect.ischema_names[type_] + col_type = self.dialect.ischema_names[type_.lower()] except KeyError: util.warn(f"Did not recognize type '{type_}' of column '{name}'") col_type = sqltypes.NullType @@ -88,9 +88,9 @@ def parse_column(self, line, state): for ikw in ("unsigned", "zerofill"): if spec.get(ikw, False): type_kw[ikw] = True - for ikw in ("charset", "collate"): - if spec.get(ikw, False): - type_kw[ikw] = spec[ikw] + if spec.get("charset", False): + type_kw["charset"] = spec["charset"] + if issubclass(col_type, (ENUM, SET)): type_args = _strip_values(type_args)