mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-19 06:28:03 +00:00
parent
6444ea3750
commit
698956783b
@ -254,7 +254,7 @@ class GenericDataFrameColumnParser:
|
|||||||
data_frame (DataFrame)
|
data_frame (DataFrame)
|
||||||
column_name (string)
|
column_name (string)
|
||||||
"""
|
"""
|
||||||
data_type = None
|
data_type = None # default to string
|
||||||
try:
|
try:
|
||||||
if data_frame[column_name].dtypes.name == "object" and any(
|
if data_frame[column_name].dtypes.name == "object" and any(
|
||||||
data_frame[column_name].dropna().values
|
data_frame[column_name].dropna().values
|
||||||
@ -316,7 +316,7 @@ class GenericDataFrameColumnParser:
|
|||||||
f"Failed to distinguish data type for column {column_name}, Falling back to {data_type}, exc: {err}"
|
f"Failed to distinguish data type for column {column_name}, Falling back to {data_type}, exc: {err}"
|
||||||
)
|
)
|
||||||
logger.debug(traceback.format_exc())
|
logger.debug(traceback.format_exc())
|
||||||
return data_type
|
return data_type or DataType.STRING
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def unique_json_structure(cls, dicts: List[Dict]) -> Dict:
|
def unique_json_structure(cls, dicts: List[Dict]) -> Dict:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user