-
Notifications
You must be signed in to change notification settings - Fork 216
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
Remove popularity constants view #2883
Changes from 14 commits
8005904
408b3d0
db8e6cf
8500303
7669f8a
68c1a07
770087f
8398d60
a305e85
a052721
6d90595
a8ae7b0
e315bc4
af86ffd
dc7cc52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -27,6 +27,14 @@ | |||||
# https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/_api/airflow/providers/postgres/hooks/postgres/index.html#airflow.providers.postgres.hooks.postgres.PostgresHook.copy_expert # noqa | ||||||
|
||||||
|
||||||
def _single_value(cursor): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that this is in a shared location and used in other modules, we can remove the underscore prefix, right?
Suggested change
(Requires updates in import locations too, of course) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed! I'm going to make a note to update this in the followup in #2678, because even as simple as this is I'd still want to fully retest. |
||||||
try: | ||||||
row = cursor.fetchone() | ||||||
return row[0] | ||||||
except Exception as e: | ||||||
raise ValueError("Unable to extract expected row data from cursor") from e | ||||||
|
||||||
|
||||||
class PostgresHook(UpstreamPostgresHook): | ||||||
""" | ||||||
PostgresHook that sets the database timeout on any query to match the airflow task | ||||||
|
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 is an example of following the existing conventions in this file, that will be cleaned up in #2678. It's not easy to refactor it in this PR without also touching a lot of other methods, and I felt that would make this harder to review.