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

DbApiHook.get_uri() doesn't follow PostgresHook schema argument #16520

Closed
LukeHong opened this issue Jun 18, 2021 · 1 comment · Fixed by #16521
Closed

DbApiHook.get_uri() doesn't follow PostgresHook schema argument #16520

LukeHong opened this issue Jun 18, 2021 · 1 comment · Fixed by #16521
Assignees

Comments

@LukeHong
Copy link
Contributor

Apache Airflow version:

Kubernetes version (if you are using kubernetes) (use kubectl version):

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:
get_uri() and get_sqlalchemy_engine() had not been implemented in PostgresHook.

When using PostgresHook('CONNECTION_NAME', schema='another_schema').get_sqlalchemy_engine() that will still use connection default schema setting through get_uri(), instead of schema that is assigned to PostgresHook().

What you expected to happen:
get_uri() should follow schema in PostgresHook.

How to reproduce it:
PostgresHook('CONNECTION_NAME', schema='another_schema'). get_uri()

Anything else we need to know:

@LukeHong LukeHong added the kind:bug This is a clearly a bug label Jun 18, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 18, 2021

Thanks for opening your first issue here! Be sure to follow the issue template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants