Pumpkincloud
Pumpkincloud

Reputation: 87

My snowsql connection locked when trying to connect and run config

I am trying to set up a Snowpipe, and I have created my warehouse, database and table and am trying to stage the filew with snowsql.

USE WAREHOUSE IoT;
USE DATABASE SNOWPIPE_TEST;

CREATE OR REPLACE STAGE my_stage;

CREATE OR REPLACE FILE_FORMAT r_json;

CREATE OR REPLACE PIPE snowpipe_pipe
   AUTO_INGEST = TRUE,
   COMMENT = 'add items IoT',
   VALIDATION_MODE = RETURN_ALL_ERRORS
  AS  (COPY INTO snowpipe_test.public.mytable
  from @snowpipe_db.public.my_stage
  FILE_FORMAT = (type = 'JSON');
  
  
CREATE PIPE mypipe AS COPY INTO mytable FROM @my_stage;
                 
I think something is locked but I am not sure.

I tried to save the config file as config1 and made a copy. It hung, then I remove the copy and tried to connect and there was no error, it just hung

Am I missing something?

Upvotes: 0

Views: 126

Answers (1)

Mike Donovan
Mike Donovan

Reputation: 369

To specify the auto ingest parameter it's AUTO_INGEST rather than AUTO-INGEST, but note that this option is not available for an internal stage. So when you try to run this command using an internal stage it should error with a message pointing this out. https://docs.snowflake.net/manuals/sql-reference/sql/create-pipe.html#optional-parameters

Also you don't need the bracket between the "AS" and "copy" on line 5.

Upvotes: 1

Related Questions