0
votes

I have storage integration, stage and notification integration created. The creation of External tables are failing.

-- creating storage integration
CREATE or REPLACE STORAGE INTEGRATION az_stg_intg1
TYPE = EXTERNAL_STAGE
STORAGE_PROVIDER = AZURE
ENABLED = TRUE
AZURE_TENANT_ID = '1304de06-xxxxxxxxx'
STORAGE_ALLOWED_LOCATIONS = ('azure://xxxxx.blob.core.windows.net/mock1', 'azure://xxxxx.blob.core.windows.net/mock2', ...)

-- create stage
create or replace stage az_stg1
url='azure://xxxxxxx.blob.core.windows.net/mock1'
STORAGE_INTEGRATION = az_stg_intg1
file_format = my_csv_format;

-- confirmed if it's accessible
select t.$1, t.$2 from @az_stg1 (file_format => 'my_csv_format', pattern=>'.*data.*[.]csv') t;


-- create notification integration
create notification integration az_notn_intg1
enabled = true
type = queue
notification_provider = azure_storage_queue
azure_storage_queue_primary_uri = 'https://xxxxx.queue.core.windows.net/queue-name'
azure_tenant_id = '1304de06-xxxxxxx';

-- create external table
create or replace external table extable_1
 integration = az_notn_intg1
 with location = @az_stg1/data1
 auto_refresh = true
 file_format = (type = csv);

On the azure side, an event grid subscription has been created and SnowflakeXXX is added to role assignments.

While executing the create external table I get error:

Pipe Notifications bind failure "Integration az_notn_intg1 not found.

1

1 Answers

0
votes

Can you write the integration name in uppercase?

create or replace external table extable_1
integration = 'AZ_NOTN_INTG1'
with location = @az_stg1/data1
auto_refresh = true
file_format = (type = csv);

The integration name must be provided in all uppercase:

https://docs.snowflake.com/en/user-guide/tables-external-azure.html#step-4-creating-an-external-table