Solved

Snowflake "All Projects Failed to Load" Error

  • 26 February 2021
  • 3 replies
  • 214 views

I’ve connected Snowflake’s test data to GoodData, added the model and tried to load the data but getting an error that says “All Projects Failed to Load” error everytime I try to upload the data.

 

Here is the error code:

2021-02-26T17:33:08.304+0100 [ERROR]: Fail to load projects "[clr5mf5skkcnvxg3nez8a5zevd9urahu]". Reason: Unable to unload:    StatementCallback; bad SQL grammar [CREATE OR REPLACE STAGE  STAGE__20210226__GhFKNxK2  COPY_OPTIONS = ( on_error='skip_file' )]; nested exception is net.snowflake.client.jdbc.SnowflakeSQLException: SQL execution error: Creating stage on shared database 'SNOWFLAKE_SAMPLE_DATA' is not allowed.:    SQL execution error: Creating stage on shared database 'SNOWFLAKE_SAMPLE_DATA' is not allowed.2021-02-26T17:33:08.310+0100 [INFO]: ====================== End of downloading and integrating data ======================2021-02-26T17:33:08.311+0100 [ERROR]: Data distribution worker failed. Reason: All projects failed to load.

Has anyone experienced that and was able to fix it?

icon

Best answer by Anonymous 26 March 2021, 16:35

View original

3 replies

Creating stage on shared database 'SNOWFLAKE_SAMPLE_DATA' is not allowed.

You'll want to set the context in your session to another database. SNOWFLAKE_SAMPLE_DATA is a shared database, which is read only.

You can do this to set the context before running that statement:

use database MY_DATABASE;

Or you could specify the database for the stage in the statement itself:

CREATE OR REPLACE STAGE
MY_DATABASE.MY_SCHEMA.STAGE__20210226__GhFKNxK2
COPY_OPTIONS = ( on_error='skip_file' );

Would I enter that in GoodData or in Snowflake? And where should it go?

use database MY_DATABASE;

or

CREATE OR REPLACE STAGE
MY_DATABASE.MY_SCHEMA.STAGE__20210226__GhFKNxK2
COPY_OPTIONS = ( on_error='skip_file' );

Shared databases are read-only. Users in a consumer account can view/query data, but cannot insert or update data, or create any objects in the database. This is why you can not create any objects on the shared database (SNOWFLAKE_SAMPLE_DATA).

https://docs.snowflake.com/en/user-guide/data-share-consumers.html#general-limitations-for-shared-databases

You can query the data in shared database like any other database.

https://docs.snowflake.com/en/user-guide/data-share-consumers.html#querying-a-shared-database

You should go to Snowflake.

Reply