-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(ingest/datahub): Use server side cursor instead of local one #12129
Conversation
Do we have tests for both mysql and postgres? |
self.query, | ||
{ | ||
"exclude_aspects": list(self.config.exclude_aspects), | ||
"since_createdon": from_createdon.strftime(DATETIME_FORMAT), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally we'd actually have a execute_server_cursor(query, params) -> Iterable[dict = row]
method that handles the dialect-specific cursor logic, and then the get_rows
method can stay simple and only have the query + parameter business logic
It uses server-side cursor which is the recommended in this case -> https://docs.sqlalchemy.org/en/20/core/connections.html#using-server-side-cursors-a-k-a-stream-results
Checklist