From 2bff0e9a5d389d433914e881800bfcd90b22bb96 Mon Sep 17 00:00:00 2001 From: Allison Suarez Miranda Date: Tue, 16 Mar 2021 16:08:33 -0700 Subject: [PATCH 1/3] making swagger docs align with common entity Signed-off-by: Allison Suarez Miranda --- metadata_service/api/swagger_doc/template.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metadata_service/api/swagger_doc/template.yml b/metadata_service/api/swagger_doc/template.yml index 34caff2a..d8fe5588 100644 --- a/metadata_service/api/swagger_doc/template.yml +++ b/metadata_service/api/swagger_doc/template.yml @@ -121,10 +121,13 @@ components: name: type: string description: 'Column name' + key: + type: string + description: 'Column key' description: type: string description: 'Column description' - type: + col_type: type: string description: 'Column type' sort_order: From 9e7e2c335caf00eadf2f216da6d4660d61d25b53 Mon Sep 17 00:00:00 2001 From: Allison Suarez Miranda Date: Tue, 16 Mar 2021 16:26:28 -0700 Subject: [PATCH 2/3] more chnages for schema Signed-off-by: Allison Suarez Miranda --- metadata_service/proxy/neo4j_proxy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metadata_service/proxy/neo4j_proxy.py b/metadata_service/proxy/neo4j_proxy.py index 8b5c8e26..f6b13e71 100644 --- a/metadata_service/proxy/neo4j_proxy.py +++ b/metadata_service/proxy/neo4j_proxy.py @@ -146,7 +146,7 @@ def _exec_col_query(self, table_uri: str) -> Tuple: col_stats = [] for stat in tbl_col_neo4j_record['col_stats']: col_stat = Stat( - stat_type=stat['stat_type'], + stat_type=stat['stat_name'], stat_val=stat['stat_val'], start_epoch=int(float(stat['start_epoch'])), end_epoch=int(float(stat['end_epoch'])) @@ -158,9 +158,11 @@ def _exec_col_query(self, table_uri: str) -> Tuple: column_badges.append(TableBadge(badge_name=badge['key'], category=badge['category'])) last_neo4j_record = tbl_col_neo4j_record + col = Column(name=tbl_col_neo4j_record['col']['name'], + key=tbl_col_neo4j_record['col']['key'], description=self._safe_get(tbl_col_neo4j_record, 'col_dscrpt', 'description'), - col_type=tbl_col_neo4j_record['col']['col_type'], + col_type=tbl_col_neo4j_record['col']['type'], sort_order=int(tbl_col_neo4j_record['col']['sort_order']), stats=col_stats, badges=column_badges) From 98c89ee078342747ab913211dc4f025b16ef2dc3 Mon Sep 17 00:00:00 2001 From: Allison Suarez Miranda Date: Wed, 17 Mar 2021 15:55:00 -0700 Subject: [PATCH 3/3] Revert "more chnages for schema" This reverts commit 9e7e2c335caf00eadf2f216da6d4660d61d25b53. Signed-off-by: Allison Suarez Miranda --- metadata_service/proxy/neo4j_proxy.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/metadata_service/proxy/neo4j_proxy.py b/metadata_service/proxy/neo4j_proxy.py index f6b13e71..8b5c8e26 100644 --- a/metadata_service/proxy/neo4j_proxy.py +++ b/metadata_service/proxy/neo4j_proxy.py @@ -146,7 +146,7 @@ def _exec_col_query(self, table_uri: str) -> Tuple: col_stats = [] for stat in tbl_col_neo4j_record['col_stats']: col_stat = Stat( - stat_type=stat['stat_name'], + stat_type=stat['stat_type'], stat_val=stat['stat_val'], start_epoch=int(float(stat['start_epoch'])), end_epoch=int(float(stat['end_epoch'])) @@ -158,11 +158,9 @@ def _exec_col_query(self, table_uri: str) -> Tuple: column_badges.append(TableBadge(badge_name=badge['key'], category=badge['category'])) last_neo4j_record = tbl_col_neo4j_record - col = Column(name=tbl_col_neo4j_record['col']['name'], - key=tbl_col_neo4j_record['col']['key'], description=self._safe_get(tbl_col_neo4j_record, 'col_dscrpt', 'description'), - col_type=tbl_col_neo4j_record['col']['type'], + col_type=tbl_col_neo4j_record['col']['col_type'], sort_order=int(tbl_col_neo4j_record['col']['sort_order']), stats=col_stats, badges=column_badges)