0
votes

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://[email protected]/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?

1
Sqitch uses ODBC driver behind the scenes, so a look at the ODBC log should provide more insight. To get the log, follow thisSergiu
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
That's something particular to Sqitch as I see not related to ODBC driver.Sergiu
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 themNickW
That's specific to DBD::ODBC; I could find no way to omit the Driver param from the connection URI. :-(theory

1 Answers

0
votes

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