TylerHillery / harlequin-adbc

An ADBC adapter for Harlequin
MIT License
2 stars 0 forks source link

Trouble with SSO Snowflake Authorization #6

Closed knodl closed 1 month ago

knodl commented 3 months ago

Hey! Thanks for the awesome adapter. I almost managed to make it work for my case, but encountered the following error while authorizing using SSO:

I run:

harlequin -a adbc "somename.snowflakecomputing.com:443/mydatabase/myschema?account=myemail&authenticator=externalbrowser" --driver-type snowflake

And get:

Harlequin could not connect to your database.
IO: 390201 (08004): The requested database does not exist or not authorized.

Environment:

harlequin, version 1.21.0

Installed Adapters:
  - duckdb, version 1.21.0
  - sqlite, version 1.21.0
  - adbc, version 0.1.1

Maybe I am missing something here, could you take a look please?

TylerHillery commented 3 months ago

Thanks for the detailed issue and bringing this to my attention. I will try to reproduce on my end and see if I can figure out a fix!

binste commented 2 months ago

Not sure that this is a harlequin-adbc issue. The command from @knodl works for me. Are you sure that you have access to the database? Do you get to the SSO screen or does the error appear before that?

knodl commented 1 month ago

@binste it looks like I have access, when I run the cli command the following happens:

The same happens when I use dbeaber, for example, but in the terminal I get IO: 390201 (08004): The requested database does not exist or not authorized. message

knodl commented 1 month ago

I figured out what was wrong in this command:

harlequin -a adbc "somename.snowflakecomputing.com:443/mydatabase/myschema?account=myemail&authenticator=externalbrowser" --driver-type snowflake

In my case it shouldn't have included myschema:

harlequin -a adbc "somename.snowflakecomputing.com:443/mydatabase?account=myemail&authenticator=externalbrowser" --driver-type snowflake

it works fine like this.

So I guess, this is not a bug :) Thanks everyone who looked into this.

TylerHillery commented 1 month ago

@knodl Thanks for following up! Apologies for not being able to look further into myself but glad it worked out!