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

Fixed dbt Manifest and Run results parsing #18234

Merged

Conversation

SumanMaharana
Copy link
Contributor

Describe your changes:

Fixed dbt Manifest and Run results parsing

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Comment on lines +177 to +179
for node, value in manifest_dict.get( # pylint: disable=unused-variable
field
).items():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SumanMaharana here we should probably check manifest_dict.get(... returns a dict and is not Null -- we can also update the method signature def remove_manifest_non_required_keys(self, manifest_dict: dict): if we are expecting indeed a Dict[str, dict].

Otherwise we'll get

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'items'

or

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'items'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TeddyCr manifest_dict.get(... will always return a dict as its defined that way in dbt.

Copy link

@ulixius9 ulixius9 merged commit 142a506 into open-metadata:main Oct 14, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingestion safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants