From d3ac4824232625dbef18107f2d0c76dcda3dd42e Mon Sep 17 00:00:00 2001 From: Jin Hyuk Chang Date: Fri, 20 Dec 2019 10:09:23 -0800 Subject: [PATCH] Fix Cypher query on frequently used table on user (#94) * Fix Cypher query on frequently used table on user * Increment version --- metadata_service/proxy/neo4j_proxy.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata_service/proxy/neo4j_proxy.py b/metadata_service/proxy/neo4j_proxy.py index ecf406cbe2..f41226aea9 100644 --- a/metadata_service/proxy/neo4j_proxy.py +++ b/metadata_service/proxy/neo4j_proxy.py @@ -825,7 +825,7 @@ def get_frequently_used_tables(self, *, user_email: str) -> Dict[str, Any]: query = textwrap.dedent(""" MATCH (user:User {key: $query_key})-[r:READ]->(tbl:Table) WHERE EXISTS(r.published_tag) AND r.published_tag IS NOT NULL - WITH user, r, tbl ORDER BY r.published_tag DESC, r.total_reads DESC LIMIT 50 + WITH user, r, tbl ORDER BY r.published_tag DESC, r.read_count DESC LIMIT 50 MATCH (tbl:Table)<-[:TABLE]-(schema:Schema)<-[:SCHEMA]-(clstr:Cluster)<-[:CLUSTER]-(db:Database) OPTIONAL MATCH (tbl)-[:DESCRIPTION]->(tbl_dscrpt:Description) RETURN db, clstr, schema, tbl, tbl_dscrpt diff --git a/setup.py b/setup.py index e1b3c76ba4..8a0bc273c0 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages -__version__ = '1.1.6' +__version__ = '1.1.7' requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')