fix(ingest/dbt): check for nodes key before accessing #7462
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix(manifest-parser): checks to ensure nodes key is present
dbt's manifest file can have seeds that list a depends_on key without the nodes key. this change checks to ensure the nodes key is present before appending to the upstream_nodes list. Example node from our dbt project:
{seed.***.customer:{'database': '***', 'schema': '***', 'name': 'customer', 'resource_type': 'seed', 'package_name': '***', 'path': 'customer.csv', 'original_file_path': 'seeds/customer.csv', 'unique_id': 'seed.***.customer', 'fqn': ['***', 'customer'], 'alias': 'customer', 'checksum': {'name': 'sha256', 'checksum': '***'}, 'config': {'enabled': True, 'alias': None, 'schema': 'example', 'database': None, 'tags': [], 'meta': {}, 'materialized': 'seed', 'incremental_strategy': None, 'persist_docs': {}, 'quoting': {}, 'column_types': {}, 'full_refresh': None, 'unique_key': None, 'on_schema_change': 'ignore', 'grants': {}, 'packages': [], 'docs': {'show': True, 'node_color': None}, 'quote_columns': None, 'post-hook': [], 'pre-hook': []}, 'tags': [], 'description': '', 'columns': {'id': {'name': 'id', 'description': '', 'meta': {}, 'data_type': None, 'quote': None, 'tags': []}, 'first_name': {'name': 'first_name', 'description': '', 'meta': {}, 'data_type': None, 'quote': None, 'tags': []}, 'last_name': {'name': 'last_name', 'description': '', 'meta': {}, 'data_type': None, 'quote': None, 'tags': []}, 'state': {'name': 'state', 'description': '', 'meta': {}, 'data_type': None, 'quote': None, 'tags': []}}, 'meta': {}, 'docs': {'show': True, 'node_color': None}, 'patch_path': '***://seeds/schema.yml', 'build_path': None, 'deferred': False, 'unrendered_config': {'schema': 'example'}, 'created_at': 1677196816.612276, 'relation_name': '"web"."example"."customer"', 'raw_code': '', 'root_path': '***', 'depends_on': {'macros': []}}}
Checklist