Document need to quote target URIs on the command line #531
Open
Description
I have ~/.snowsql/config
set like below
[connections]
username = nickwang
dbname = MYDB
warehousename = MY_WH
account = myaccount
authenticator = SNOWFLAKE_JWT
private_key_path = "/Users/nickwang/rsa_key.p8"
SNOWSQL_PRIVATE_KEY_PASSPHRASE
is set in the environment variable and I can simply run snowsql
without any issues or prompts. iodbctest
also works fine to connect to snowflake.
when I run
sqitch status -vvv db:snowflake://nickwang@myaccount.snowflakecomputing.com/MYDB?Driver=Snowflake;authenticator=SNOWFLAKE_JWT;priv_key_file=/Users/nickwang/rsa_key.p8;uid=nickwang
I'm getting following traces:
[Snowflake][DSI] (20032) Required setting 'PWD' is not present in the connection settings. (SQL-28000)
trace: Trace begun at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/darwin-thread-multi-2level/DBI.pm line 691
trace: DBI::__ANON__(undef, undef) called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/darwin-thread-multi-2level/DBI.pm line 748
trace: DBI::connect('DBI', 'dbi:ODBC:Server=myaccount.snowflakecomputing.com;Port=443;Database=MYDB;Driver=Snowflake', 'nickwang', undef, 'HASH(0x7fc5d7bd61d8)') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/App/Sqitch/Engine/snowflake.pm line 225
trace: App::Sqitch::Engine::snowflake::__ANON__('App::Sqitch::Engine::snowflake=HASH(0x7fc5d7bfe0a0)') called at (eval 370) line 52
trace: App::Sqitch::Engine::snowflake::dbh('App::Sqitch::Engine::snowflake=HASH(0x7fc5d7bfe0a0)') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/App/Sqitch/Engine/snowflake.pm line 283
trace: App::Sqitch::Engine::snowflake::initialized('App::Sqitch::Engine::snowflake=HASH(0x7fc5d7bfe0a0)') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/App/Sqitch/Command/status.pm line 129
trace: App::Sqitch::Command::status::catch {...} ('App::Sqitch::X=HASH(0x7fc5d6149dd8)') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/Try/Tiny.pm line 123
trace: Try::Tiny::try('CODE(0x7fc5d4254768)', 'Try::Tiny::Catch=REF(0x7fc5d60a9058)') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/App/Sqitch/Command/status.pm line 134
trace: App::Sqitch::Command::status::execute(undef, 'db:snowflake://nickwang@myaccount.snowflakecomputing.com/MYDB?Driver=Snowflake') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/App/Sqitch.pm line 206
trace: App::Sqitch::try {...} at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/Try/Tiny.pm line 100
trace: eval {...} at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/Try/Tiny.pm line 93
trace: Try::Tiny::try('CODE(0x7fc5d400aa70)', 'Try::Tiny::Catch=REF(0x7fc5d79bf1d8)') called at /usr/local/Cellar/sqitch/v1.1.0/bin/../lib/perl5/App/Sqitch.pm line 226
trace: App::Sqitch::go('App::Sqitch') called at /usr/local/bin/sqitch line 17
Not sure what was set wrong. Can someone help please?
Activity
theory commentedon Jul 19, 2020
What was your fix, @wxcsdhr?
wxcsdhr commentedon Jul 20, 2020
@theory that was a stupid mistake I made. Basically the URI I put here should be quoted or my terminal would treat it as several commands instead of a single.
theory commentedon Jul 21, 2020
Cool, not the first time it has happened. I should add notes to various docs to this effect, it's not the first time it has come up.