TylerHillery / harlequin-adbc

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

--driver-type is parsed as the target db name #3

Open DeanSherwin opened 4 months ago

DeanSherwin commented 4 months ago
harlequin -a adbc --driver-type snowflake "username:pass@account/mydatabsename"
╭─ Harlequin could not connect to your database. ─╮
│ 'driver_type'                                   │
╰─────────────────────────────────────────────────╯

I think there is an issue parsing arguments.

TylerHillery commented 3 months ago

Interesting I can't seem to reproduce the error on my end. Could you try using single quotes instead of double quotes around the snowflake URI?

TylerHillery commented 3 months ago

For the account make sure it's formatted as accountID-orgID I noticed when I copied this value from Snowflake it used a period instead of a hyphen

DeanSherwin commented 3 months ago

Still getting the same issue.

Command I'm using with (falsified credentials obviously).

harlequin -a adbc  --driver-type snowflake  'dean:p455w0rd@sv1358897.us-east-1/MY_DATABASE'
╭─ Harlequin could not connect to your database. ─╮
│ 'driver_type'                                    │
╰──────────────-─────-────────-───────-──────────╯

Does that look right? I use these details to connect using ODBC with unixodbc and the Snowflake ODBC driver with no issue.

Could you provide an example command with obfuscated account details perhaps?

DeanSherwin commented 3 months ago

Okay. So I re-ran sudo pip install adbc-driver-snowflake and despite the Requirement already satisfied, it now works! (although Data Catalog is empty...). No idea why it suddenly works now.

If I have time over the weekend I'll try to figure out what was going on using a bare VM to recreate it. I didn't use pipx either (just pip) so maybe that was causing it. And if I can re-create it I'll do a PR with a fix to show a better error message.