Skip to content
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

Importer: Update nodes already in DB #135

Open
joeflack4 opened this issue Dec 1, 2021 · 0 comments
Open

Importer: Update nodes already in DB #135

joeflack4 opened this issue Dec 1, 2021 · 0 comments
Assignees
Labels
ease:medium update Enhancement / update for an existing feature. urgency:low

Comments

@joeflack4
Copy link
Collaborator

joeflack4 commented Dec 1, 2021

Description

From importer.py:

    def import_node_attribute(self, node_attribute):
        entity = node_attribute['entity']
        attribute = node_attribute['attribute']
        system = node_attribute['system']
        logger.info(f'Importing NodeAttribute {system}.{entity}.{attribute} ...')

        na_node = self.mdr_graph.get_node_attribute(system, entity, attribute)
        if na_node is not None:  # already exists. Skip
            # TODO: Update the node
            return
    def import_harmonized_attribute(self, harmonized_attribute):
        system = harmonized_attribute['system']
        entity = harmonized_attribute['entity']
        attribute = harmonized_attribute['attribute']
        logger.info(f'Importing HarmonizedAttribute {system}.{entity}.{attribute} ...')

        ha_node = self.mdr_graph.get_harmonized_attribute(system, entity, attribute)

        if ha_node is not None:  # already exists. Skip
            # TODO: Update
            return
@joeflack4 joeflack4 self-assigned this Dec 1, 2021
@joeflack4 joeflack4 added ease:medium urgency:low update Enhancement / update for an existing feature. labels Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ease:medium update Enhancement / update for an existing feature. urgency:low
Projects
None yet
Development

No branches or pull requests

1 participant