atlasclient icon indicating copy to clipboard operation
atlasclient copied to clipboard

atlasclient.base - Missing attr EntityUniqueAttribute: searchParameters

Open Nyna71 opened this issue 5 years ago • 3 comments

In release 0.1.7, atlasclient.models.EntityUniqueAttribute raised an exception when reading the entity attribute.

atlasclient 0.1.7

>>> from det.app import ATLAS_CLIENT
>>> ATLAS_CLIENT
<atlasclient.client.Atlas object at 0x7fc59d6a1cf8>
>>> hdfs_path_EUA = ATLAS_CLIENT.entity_unique_attribute('hdfs_path', qualifiedName='/data/d0/raw')
>>> hdfs_path_EUA
<atlasclient.models.EntityUniqueAttribute object at 0x7fc59ddc73c8>
>>> hdfs_path_EUA.entity
ERROR - 2019-10-25 11:29:26,595 - atlasclient.base - Missing attr EntityUniqueAttribute: searchParameters
{'typeName': 'hdfs_path', 'attributes': {'owner': None, 'modifiedTime': 0, 'isFile': False, 'numberOfReplicas': 0, 'qualifiedName': '/data/d0/raw', 'description': None, 'extendedAttributes': None, 'path': '/data/d0/raw', 'posixPermissions': None, 'createTime': 0, 'fileSize': 0, 'clusterName': None, 'name': '/data/d0/raw', 'isSymlink': False, 'group': None}, 'guid': '64a26e16-e38a-4099-af7e-971449772aa4', 'status': 'ACTIVE', 'createdBy': 'id996713', 'updatedBy': 'id996713', 'createTime': 1549534063925, 'updateTime': 1564477384239, 'version': 0, 'classifications': []}

atlasclient 0.1.3

>>> from det.app import ATLAS_CLIENT
>>> ATLAS_CLIENT
<atlasclient.client.Atlas object at 0x7ff21e42f5f8>
>>> hdfs_path_EUA = ATLAS_CLIENT.entity_unique_attribute('hdfs_path', qualifiedName='/data/d0/raw')
>>> hdfs_path_EUA
<atlasclient.models.EntityUniqueAttribute object at 0x7ff22d777358>
>>> hdfs_path_EUA.entity
{'typeName': 'hdfs_path', 'attributes': {'owner': None, 'modifiedTime': 0, 'isFile': False, 'numberOfReplicas': 0, 'qualifiedName': '/data/d0/raw', 'description': None, 'extendedAttributes': None, 'path': '/data/d0/raw', 'posixPermissions': None, 'createTime': 0, 'fileSize': 0, 'clusterName': None, 'name': '/data/d0/raw', 'isSymlink': False, 'group': None}, 'guid': '64a26e16-e38a-4099-af7e-971449772aa4', 'status': 'ACTIVE', 'createdBy': 'id996713', 'updatedBy': 'id996713', 'createTime': 1549534063925, 'updateTime': 1564477384239, 'version': 0, 'classifications': []}

Nyna71 avatar Oct 25 '19 09:10 Nyna71

I tested atlasclient 0.1.7 and 1.0.0 together with a bare Atlas server 2.0.0 running in a docker container, and in such configuration the atlasclient.base does not raise the Missing attr EntityUniqueAttribute exception.

This means atlasclient>0.1.3 is not compatible with Atlas 0.8.0 which is delivered with our HDP 2.6.5 cluster.

Nyna71 avatar Oct 27 '19 11:10 Nyna71

Do you have the same issue with pyatlasclient which is a fork of atlasclient and more actively updated?

jpoullet2000 avatar Jan 15 '20 16:01 jpoullet2000

I have the same issue running pyatlasclient 1.0.3 with Atlas server 2.0.0. It works fine when running the code on my local Mac with Python 3.6.4 (Anaconda distro), while it is logging the following messages when running in a docker container (python:3.6-alpine): f2020-03-19 10:28:43,731 - Missing attr EntityUniqueAttribute: searchParameters

AlessandroLollo avatar Mar 19 '20 10:03 AlessandroLollo