I have created an empty database and granted all permissions to a role for the username I’ve specified in the config. However when I run it with a non-qualified name, I get:
Exception in thread "main" net.snowflake.client.jdbc.SnowflakeSQLException: Cannot perform CREATE SCHEMA. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.
Setting up...
Exception in thread "main" net.snowflake.client.jdbc.SnowflakeSQLException: Cannot perform CREATE SCHEMA. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:102)
at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:410)
at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:371)
at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:195)
at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:147)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:529)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:158)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQuery(SnowflakeStatementV1.java:91)
at com.snowplowanalytics.snowflake.loader.connection.Jdbc$.executeAndOutput(Jdbc.scala:88)
at com.snowplowanalytics.snowflake.loader.Initializer$.run(Initializer.scala:29)
at com.snowplowanalytics.snowflake.loader.Main$.main(Main.scala:25)
at com.snowplowanalytics.snowflake.loader.Main.main(Main.scala)
Sorry, I’m completely lost about this. The only things I can suggest are: check if region matches in Console and config or try to re-create the DB.
Also, queries should be shown in Console’s history even if they failed. Would it it possible to check if they’re present there and may be try to re-run them right there.
I’m getting the exact same error when running snowplow-snowflake-loader-0.3.1.jar setup.
I’ve manually run the queries to create atomic schema and atomic.events table.
Not sure where I can find the queries that would create: