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

MINOR: added fall back to table metric computation #14771

Merged

Conversation

TeddyCr
Copy link
Contributor

@TeddyCr TeddyCr commented Jan 18, 2024

Describe your changes:

  • For engines where we get table metrics from system tables, fall back to base logic if no data is found

Community thread: https://openmetadata.slack.com/archives/C02B6955S4S/p1705391254940659

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.

Improvement

  • I have added tests around the new logic.
  • For connector/ingestion changes: I updated the documentation.

@TeddyCr TeddyCr requested a review from a team as a code owner January 18, 2024 09:03
@github-actions github-actions bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Jan 18, 2024
)


class SnowflakeTableMetricComputer(BaseTableMetricComputer):
Copy link
Member

@ayush-shah ayush-shah Jan 18, 2024

Choose a reason for hiding this comment

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

Should we have a file structure similar to what we have for interfaces?
that would help keep the files small and specific. wdyt?

  • orm
    -- functions
    --- snowflake
    ---- table_metric_computer.py
    --- bigquery
    ---- table_metric_computer.py

something like that

Copy link
Contributor Author

@TeddyCr TeddyCr Jan 18, 2024

Choose a reason for hiding this comment

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

🤔 we could, though I am not sure it is necessary at this point. We have a small file ~400+ lines with tightly coupled classes.

Copy link
Member

Choose a reason for hiding this comment

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

okayy, maybe in the future when we add more dialects / dbs in the file, we can make it more readable in the directory structure. Approving Thanks 🙌

Copy link

Quality Gate Passed Quality Gate passed for 'open-metadata-ingestion'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
47.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@TeddyCr TeddyCr enabled auto-merge (squash) January 18, 2024 13:05
@TeddyCr TeddyCr merged commit 9c4ec6c into open-metadata:main Jan 18, 2024
19 of 21 checks passed
Abhishek332 pushed a commit to Abhishek332/OpenMetadata that referenced this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingestion profiler 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.

2 participants