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

%sqlcmd does not support connection choosing (--alias) #1022

Open
Hubbitus opened this issue Aug 29, 2024 · 2 comments
Open

%sqlcmd does not support connection choosing (--alias) #1022

Hubbitus opened this issue Aug 29, 2024 · 2 comments

Comments

@Hubbitus
Copy link

What happens?

Hello.
With %sql magic I be able to create several connections to the databases, but then I cannot list tables, explore and profile them because can't select in %sqlcmd

To Reproduce

%sql duckdb:// --alias db1
> Connecting and switching to connection 'db1'
%sql duckdb:// --alias db2
> Connecting and switching to connection 'db2'
%sqlcmd tables --alias db1
> UsageError: unrecognized arguments: --alias db1
%sqlcmd --alias db1 tables
> UsageError: %sqlcmd has no command: '--alias'. Valid commands are: tables, columns, test, profile, explore, snippets, connect

OS:

Linux

JupySQL Version:

0.10.12

Full Name:

Pavel Alexeev

Affiliation:

GID

@edublancas
Copy link

I believe they will all use the existing connection, you can switch to whatever db you want and then run %sqlcmd: https://jupysql.ploomber.io/en/latest/howto.html#switch-connections

@Hubbitus
Copy link
Author

@edublancas, that workaround works, thank you.
But I think it will be more consistent to have similar switch like in %sql. How you think?

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

No branches or pull requests

2 participants