-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freature/atlas serializable #1
base: main
Are you sure you want to change the base?
Conversation
|
||
class FsAtlasCSVLoader(Loader): | ||
""" | ||
Write node and relationship CSV file(s) that can be consumed by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write entity?
""" | ||
Write node and relationship CSV file(s) that can be consumed by | ||
AtlasCsvPublisher. | ||
It assumes that the record it consumes is instance of AtlasCsvSerializable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it just be AtlasSerializable?
|
||
|
||
|
||
def _get_neo4j_suffix_value(value: Any) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this?
# Directory should be deleted after publish is finished | ||
Job.closer.register(_delete_dir) | ||
|
||
def load(self, csv_serializable: AtlasSerializable) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it just be serializable?
|
||
from collections import namedtuple | ||
|
||
AtlasEntity = namedtuple( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to enforce presence of qualifiedName
within attributes?
super(AtlasCSVPublisher, self).__init__() | ||
|
||
def init(self, conf: ConfigTree) -> None: | ||
self._atlas_client = AtlasClient('http://localhost:21000', ('admin', 'admin')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one can be pretty much copied from atlas_search_data_extractor.py
TYPE_NAME: entity.typeName | ||
} | ||
for key, value in entity.attributes.items(): | ||
key_suffix = '-elo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it needed?
from databuilder.models.atlas_entity import AtlasEntity | ||
from databuilder.models.atlas_relationship import AtlasRelationship | ||
|
||
GUID = 'guid' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idea: amundsen-io#1103 introduces atlas_utils.py in amundsen_common which could be reused here
Signed-off-by: DOMINIK CHOMA <dominik.choma@ing.com>
Signed-off-by: DOMINIK CHOMA <dominik.choma@ing.com>
Signed-off-by: DOMINIK CHOMA <dominik.choma@ing.com>
Summary of Changes
Tests
Documentation
CheckList
Make sure you have checked all steps below to ensure a timely review.