-1

I have installed Sqitch on a Windows 10 PC using Strawberry Perl. My Snowflake environment has key-pair authentication set up. My sqitch.conf file has a target set up with the uri.

I am following the Sqitch tutorial and am just trying to create a schema in a DB

When I run this command: c:\Projects\Sqitch\flipr>sqitch deploy

It shows this output: Adding registry tables to db:snowflake://xxx@xxx.eu-west-1.snowflakecomputing.com/flipr?Driver=SnowflakeDSIIDriver;authenticator=SNOWFLAKE_JWT;priv_key_file=/xxx/rsa_key.p8;priv_key_file_pwd=xxx;warehouse=xxx;uid=xxx

(xxx obviously masks any sensitive values)

It then just sits there doing nothing. I've left it for at least 30 mins so it's definitely not going to complete. If I kill it (ctrl+C) then it shows this - which implies that snowsql is running but it is either not executing properly or not shutting down properly and returning control to Sqitch:

Aborted! "C:\Program Files\Snowflake SnowSQL\snowsql.exe" unexpectedly returned exit value 1

Does anyone have any idea what the problem is?

NickW
  • 8,430
  • 2
  • 6
  • 19
  • Sqitch uses ODBC driver behind the scenes, so a look at the ODBC log should provide more insight. To get the log, follow [this](https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors) – Sergiu Mar 26 '21 at 10:53
  • OK - that was actually a secondary question I have. If I use the ODBC name that I have set up (using ODBC Admin in Windows) in the target definition then this command errors immediately within Sqitch. It will only work if I use the Snowflake Driver name (SnowflakeDSIIDriver). Is there some option where instead of having "...;Driver=SnowflakeDSIIDriver;...", I can have something like "...;ODBC_Name=Snowflake;..." ? – NickW Mar 26 '21 at 11:08
  • That's something particular to Sqitch as I [see](https://github.com/sqitchers/sqitch/blob/develop/t/snowflake.t) not related to ODBC driver. – Sergiu Mar 26 '21 at 13:22
  • I found an issue with how my Named ODBC object was configured and changing that fixed this particular issue. Still encountering other errors with trying to get Sqitch to run (didn't create registry tables, I created them manually, now deploy is trying to upgrade them and failing) but will ask another question if I can't resolve them – NickW Mar 26 '21 at 13:35
  • That's specific to DBD::ODBC; I could find no way to omit the `Driver` param from the connection URI. :-( – theory Mar 27 '21 at 14:49

1 Answers1

0

Fixed by amending the ODBC - server needed the full URL (including .snowflakecomputing.com) and I just had the account/region

NickW
  • 8,430
  • 2
  • 6
  • 19
  • It's supposed to work without the `.snowflakecomputing.com`. Would you mind [filing a bug report](https://github.com/sqitchers/docker-sqitch/issues/)? – theory Mar 27 '21 at 14:50