소스 검색

HUE-8847 [catalog] Use classifications as tags when Atlas is enabled

Johan Ahlen 6 년 전
부모
커밋
64f43d9eca
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      desktop/libs/metadata/src/metadata/catalog/atlas_client.py

+ 8 - 1
desktop/libs/metadata/src/metadata/catalog/atlas_client.py

@@ -115,9 +115,16 @@ class AtlasApi(Api):
     try:
     try:
       response = {
       response = {
         "status": 0,
         "status": 0,
-        "results": []
+        "results": [],
+        "facets": {
+          "tags": {}
+        }
       }
       }
 
 
+      # list_tags should return empty response for Atlas
+      if (not query_s and facetFields and 'tags' in facetFields):
+        return response
+
       query_s = (query_s.strip() if query_s else '') + '*'
       query_s = (query_s.strip() if query_s else '') + '*'
       atlas_dsl_query = 'from %s where name like \'%s\' limit %s' % ('hive_table', query_s, limit)
       atlas_dsl_query = 'from %s where name like \'%s\' limit %s' % ('hive_table', query_s, limit)