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

feat(snowflake): set is_temp_table and is_allowed_table function for SqlParsingAggregator in SnowflakeV2Source #12438

Merged
merged 4 commits into from
Jan 28, 2025

Conversation

sgomezvillamor
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...datahub/ingestion/source/snowflake/snowflake_v2.py 78.57% 3 Missing ⚠️
Files with missing lines Coverage Δ
...datahub/ingestion/source/snowflake/snowflake_v2.py 88.51% <78.57%> (-0.58%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 563656c...0dda7c5. Read the comment docs.

@sgomezvillamor sgomezvillamor marked this pull request as ready for review January 23, 2025 08:57
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Jan 23, 2025
@sgomezvillamor sgomezvillamor changed the title feat(snowflake): provide is_temp_table function for SqlParsingAggregator feat(snowflake): set is_temp_table and is_allowed_table function for SqlParsingAggregator in SnowflakeV2Source Jan 27, 2025
):
return True

# This is also a temp table if
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe note that this logic mirrors the logic from snowflake_queries.py?

not sure if there's a way to remove the code duplication, but that'd be even better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@sgomezvillamor sgomezvillamor Jan 27, 2025

Choose a reason for hiding this comment

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

The only thing that comes to my mind would be to give the responsibility of instantiating SqlParsingAggregator to the SnowflakeV2Source itself, so SnowflakeQueriesExtractor gets it as constructor parameter.
This way we still instantiate SqlParsingAggregator twice but is_temp_table and is_allowed_table would be defined once in the SnowflakeV2Source
WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I spent some time trying this, and it's getting complicated, so I'm leaving it as is.

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Jan 27, 2025
@sgomezvillamor sgomezvillamor merged commit 7870b13 into master Jan 28, 2025
185 of 188 checks passed
@sgomezvillamor sgomezvillamor deleted the feature/ing-804-feat-snowflake-is-temp-table branch January 28, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants