-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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/druid) Handling gracefully if no table returned in a schema #8203
fix(ingest/druid) Handling gracefully if no table returned in a schema #8203
Conversation
Adding `view` schema to the default deny
) | ||
|
||
result = connection.execute(text(query)) | ||
return [row.TABLE_NAME for row in result] if result.rowcount > 0 else [] |
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.
What exactly is this result.rowcount > 0
check doing? Does sqlalchemy normally error if the row count is 0?
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.
I threw an error (This result object does not return rows. It has been closed automatically.
) if no rows were returned and it tried to iterate over the results.
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.
This seems like a druid sqlalchemy bug to me... or something that should be configurable. Why would returning no rows result in an error?
Would at least prefer if we referenced the existing code (e.g. wrapped with a try catch) rather than overwriting it, if possible
view
schema to the default denyChecklist