From 4013fb8fd5b5ab3ed06f3ca3b28e4de922e8848f Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 10 Aug 2022 11:29:21 -0500 Subject: [PATCH] minor bug fix, got fixed in data-transport returning properly formatted meta data --- data/maker/__init__.py | 2 +- data/maker/prepare/__init__.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 0d8bf33..7ea2c74 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -425,7 +425,7 @@ class Generator (Learner): _schema = self.get_schema() - _schema = [{'name':_item.name,'type':_item.field_type} for _item in _schema] + # _schema = [{'name':_item.name,'type':_item.field_type} for _item in _schema] _df = self.format(_df,_schema) _log = [{"name":_schema[i]['name'],"dataframe":_df[_df.columns[i]].dtypes.name,"schema":_schema[i]['type']} for i in np.arange(len(_schema)) ] self.log(**{"action":"consolidate","input":_log}) diff --git a/data/maker/prepare/__init__.py b/data/maker/prepare/__init__.py index 8da73c3..4b0bfd3 100644 --- a/data/maker/prepare/__init__.py +++ b/data/maker/prepare/__init__.py @@ -46,15 +46,15 @@ class Input : :param store data-store parameters/configuration :param sql sql query that pulls a representative sample of the data """ - # self._schema = _args['schema'] if 'schema' in _args else {} - # # - # # schema data should be in a hash map for these purposes - # # + self._schema = _args['schema'] if 'schema' in _args else {} + # + # schema data should be in a hash map for these purposes + # # if self._schema : # r = {} # for _item in self._schema : # r[_item['name']] = r[_item['type']] - # self._schema = r + # self._schema = r self.df = _args['data'] if 'sql' not in _args :