totvslabs/pyCarol

Error on fetch_parquet from DataModel

GuilhermeSpadaccia opened this issue · 0 comments

When the DM is not exported, it means, I have no parquet files from a specific DataModel and I run the fetch_parquet for this DM I got and erro:

    143                 d = pd.DataFrame(columns=cols_keys)
    144                 for key, value in _field_types.items():
--> 145                     d.loc[:, key] = d.loc[:, key].astype(_DATA_MODEL_TYPES_MAPPING.get(value.lower(), str), copy=False)
    146                 if columns:
    147                     columns = list(set(columns))

AttributeError: 'dict' object has no attribute 'lower'

It should returns a treated error message.