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

GEN-2157: Snowflake increased cost issue #18825

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

harshsoni2024
Copy link
Contributor

@harshsoni2024 harshsoni2024 commented Nov 28, 2024

Describe your changes:

Fixes

Here are some of the findings:

  1. Simply maintaining an open connection with engine.connect() does not keep the warehouse active.
  2. Only active queries or operations (like metadata queries or table scans) trigger warehouse usage.
  • Snowflake warehouse has auto suspend/resume feature which is enable by default doc

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.

Copy link

start_time=self.start,
end_time=self.end,
)
).fetchall()
Copy link
Collaborator

Choose a reason for hiding this comment

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

this can kill the memory. Try server side cursors. example

with engine.connect() as conn:
    result = conn.execution_options(stream_results=True, max_row_buffer=100).execute(
        text("select * from public.employees")
    )
    counter = 0
    for row in result:
        counter += 1
print(counter)

Copy link

sonarqubecloud bot commented Dec 3, 2024

Quality Gate Failed Quality Gate failed for 'open-metadata-ingestion'

Failed conditions
0.0% Coverage on New Code (required ≥ 20%)

See analysis details on SonarQube Cloud

@harshsoni2024 harshsoni2024 merged commit 1140578 into open-metadata:main Dec 3, 2024
14 of 17 checks passed
@harshsoni2024 harshsoni2024 deleted the gen-2157 branch December 19, 2024 05:57
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.

3 participants