We configured S3 object create notifications to Snowpipe. It receives the message but does not forward them, so that data is not loaded. When we run the COPY INTO statement manually, the data loads.
Sample output from SYSTEM$PIPE_STATUS:
{
"executionState": "RUNNING",
"lastReceivedMessageTimestamp": "2020-03-18T14:14:48.69Z",
"notificationChannelName": "arn:aws:sqs:us-east-1:[clipped]:[clipped]",
"numOutstandingMessagesOnChannel": 0,
"pendingFileCount": 0
}
If event messages are getting received from the message queue but are not forwarded to the pipe, then there is likely a mismatch between the Blob storage path where the new data files are created and the combined path specified in the Snowflake stage and pipe definitions
But the path in the stage is the bucket name followed by /
, so that any file created in the bucket should trigger a load. And the file names are definitely new and unique (as created by Kinesis Firehose). The stage definition:
CREATE STAGE if not exists my_stage URL = 's3://my-stage/'
CREDENTIALS = (AWS_KEY_ID = 'XXX' AWS_SECRET_KEY = 'XXX');
The pipe definition:
create or replace pipe my_schema.my_data_pipe
auto_ingest=true
aws_sns_topic='arn:aws:sns:us-east-1:[my-account]:my-s3-create-event'
as
copy into my_schema.my_table
from @my_schema.my_stage
file_format=(type='PARQUET' compression='SNAPPY')
match_by_column_name=case_insensitive;
Note also that when we refresh the pipe the data loads: alter pipe my_schema.my_pipe refresh;
What else might cause Snowpipe to not forward the S3 create message and trigger the load?