Ejemplo n.º 1
0
    def add_classifications_by_type(self, type_name, uniq_attributes,
                                    classifications):
        query_param = attributes_to_params(uniq_attributes)

        self.client.call_api(
            EntityClient.ADD_CLASSIFICATION_BY_TYPE_AND_ATTRIBUTE.format_path(
                {'type_name': type_name}), None, query_param, classifications)
Ejemplo n.º 2
0
    def get_entity_by_attribute(self, type_name, uniq_attributes, min_ext_info=False, ignore_relationships=False):
        query_params = attributes_to_params(uniq_attributes)
        query_params["minExtInfo"] = min_ext_info
        query_params["ignoreRelationships"] = ignore_relationships

        return self.client.call_api(EntityClient.GET_ENTITY_BY_UNIQUE_ATTRIBUTE.format_path_with_params(type_name),
                                    AtlasEntityWithExtInfo, query_params)
Ejemplo n.º 3
0
    def remove_classification_by_name(self, type_name, uniq_attributes,
                                      classification_name):
        query_params = attributes_to_params(uniq_attributes)
        query = {
            'type_name': type_name,
            'classification_name': classification_name
        }

        self.client.call_api(
            EntityClient.DELETE_CLASSIFICATION_BY_TYPE_AND_ATTRIBUTE.
            format_path({query}), None, query_params)
Ejemplo n.º 4
0
    def get_lineage_info_attr(self, type_name, attributes, direction, depth):
        query_params = attributes_to_params(attributes, {"direction": direction, "depth": depth})

        return self.client.call_api(LineageClient.GET_LINEAGE_BY_ATTRIBUTES.format_path_with_params(type_name), AtlasLineageInfo, query_params)
Ejemplo n.º 5
0
    def set_labels_by_name(self, type_name, uniq_attributes, labels):
        query_param = attributes_to_params(uniq_attributes)

        self.client.call_api(
            EntityClient.ADD_LABELS_BY_UNIQUE_ATTRIBUTE.format(
                {'type_name': type_name}), None, query_param, labels)
Ejemplo n.º 6
0
    def delete_entity_by_attribute(self, type_name, uniq_attributes):
        query_param = attributes_to_params(uniq_attributes)

        return self.client.call_api(
            EntityClient.DELETE_ENTITY_BY_ATTRIBUTE.format_path_with_params(
                type_name), EntityMutationResponse, query_param)
Ejemplo n.º 7
0
    def get_entity_header_by_attribute(self, type_name, uniq_attributes):
        query_params = attributes_to_params(uniq_attributes)

        return self.client.call_api(
            EntityClient.GET_ENTITY_HEADER_BY_UNIQUE_ATTRIBUTE.format_path(
                {'type_name': type_name}), AtlasEntityHeader, query_params)