mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
Co-authored-by: Mayur SIngal <mayursingal@Mayurs-MacBook-Pro.local>
This commit is contained in:
parent
dc2c7c0fb7
commit
c64f3fef34
@ -68,7 +68,8 @@
|
||||
"SET",
|
||||
"GEOGRAPHY",
|
||||
"ENUM",
|
||||
"JSON"
|
||||
"JSON",
|
||||
"UUID"
|
||||
]
|
||||
},
|
||||
"constraint": {
|
||||
|
@ -522,13 +522,15 @@ class SQLSource(Source[OMetaDatabaseAndTable]):
|
||||
repr(column["type"]), column["name"]
|
||||
)
|
||||
)
|
||||
col_data_length = (
|
||||
1 if col_data_length is None else col_data_length
|
||||
)
|
||||
dataTypeDisplay = (
|
||||
f"{data_type_display}"
|
||||
if data_type_display
|
||||
else "{}({})".format(col_type, col_data_length)
|
||||
if col_data_length
|
||||
else col_type
|
||||
)
|
||||
col_data_length = (
|
||||
1 if col_data_length is None else col_data_length
|
||||
)
|
||||
om_column = Column(
|
||||
name=column["name"],
|
||||
|
@ -12,8 +12,10 @@
|
||||
import re
|
||||
from textwrap import dedent
|
||||
|
||||
from sqlalchemy import exc, sql
|
||||
from sqlalchemy import exc, sql, util
|
||||
from sqlalchemy.engine import reflection
|
||||
from sqlalchemy.sql import sqltypes
|
||||
from sqlalchemy.sql.sqltypes import VARCHAR, String
|
||||
from sqlalchemy_vertica.base import VerticaDialect
|
||||
|
||||
from metadata.ingestion.ometa.openmetadata_rest import MetadataServerConfig
|
||||
@ -26,6 +28,13 @@ from metadata.utils.sql_queries import (
|
||||
)
|
||||
|
||||
|
||||
class UUID(String):
|
||||
|
||||
"""The SQL UUID type."""
|
||||
|
||||
__visit_name__ = "UUID"
|
||||
|
||||
|
||||
@reflection.cache
|
||||
def get_columns(self, connection, table_name, schema=None, **kw):
|
||||
if schema is not None:
|
||||
@ -129,7 +138,7 @@ def _get_column_info(
|
||||
args = ()
|
||||
elif charlen:
|
||||
args = (int(charlen),)
|
||||
|
||||
self.ischema_names["UUID"] = UUID
|
||||
if attype.upper() in self.ischema_names:
|
||||
coltype = self.ischema_names[attype.upper()]
|
||||
else:
|
||||
|
@ -132,6 +132,7 @@ class ColumnTypeParser:
|
||||
"VARIANT": "JSON",
|
||||
"XML": "BINARY",
|
||||
"XMLTYPE": "BINARY",
|
||||
"UUID": "UUID",
|
||||
}
|
||||
|
||||
_COMPLEX_TYPE = re.compile("^(struct|map|array|uniontype)")
|
||||
|
Loading…
x
Reference in New Issue
Block a user