- Connecting to Snowflake
- Loading Data into Snowflake
- Unloading Data from Snowflake
- Using Snowflake
- Sharing Data Securely in Snowflake
- Managing Your Snowflake Organization
- Managing Your Snowflake Account
- Managing Security in Snowflake
- Managing Governance in Snowflake
- Managing Cost in Snowflake
- General Reference
- SQL Command Reference
- Summary of Commands
- All Commands (Alphabetical)
- ALTER <object>
- ALTER ACCOUNT
- ALTER API INTEGRATION
- ALTER CONNECTION
- ALTER DATABASE
- ALTER DATABASE ROLE
- ALTER EXTERNAL FUNCTION
- ALTER EXTERNAL TABLE
- ALTER FAILOVER GROUP
- ALTER FILE FORMAT
- ALTER FUNCTION
- ALTER INTEGRATION
- ALTER MASKING POLICY
- ALTER MATERIALIZED VIEW
- ALTER NETWORK POLICY
- ALTER NOTIFICATION INTEGRATION
- ALTER PASSWORD POLICY
- ALTER PIPE
- ALTER PROCEDURE
- ALTER REPLICATION GROUP
- ALTER RESOURCE MONITOR
- ALTER ROLE
- ALTER ROW ACCESS POLICY
- ALTER SCHEMA
- ALTER SECURITY INTEGRATION
- ALTER SECURITY INTEGRATION (External OAuth)
- ALTER SECURITY INTEGRATION (Snowflake OAuth)
- ALTER SECURITY INTEGRATION (SAML2)
- ALTER SECURITY INTEGRATION (SCIM)
- ALTER SEQUENCE
- ALTER SESSION
- ALTER SESSION POLICY
- ALTER SHARE
- ALTER STAGE
- ALTER STORAGE INTEGRATION
- ALTER STREAM
- ALTER TABLE
- ALTER TABLE … ALTER COLUMN
- ALTER TAG
- ALTER TASK
- ALTER USER
- ALTER VIEW
- ALTER WAREHOUSE
- BEGIN
- CALL
- CALL (with Anonymous Procedure)
- COMMENT
- COMMIT
- COPY INTO <location>
- COPY INTO <table>
- CREATE <object>
- CREATE ACCOUNT
- CREATE API INTEGRATION
- CREATE <object> … CLONE
- CREATE CONNECTION
- CREATE DATABASE
- CREATE DATABASE ROLE
- CREATE EXTERNAL FUNCTION
- CREATE EXTERNAL TABLE
- CREATE FAILOVER GROUP
- CREATE FILE FORMAT
- CREATE FUNCTION
- CREATE INTEGRATION
- CREATE MANAGED ACCOUNT
- CREATE MASKING POLICY
- CREATE MATERIALIZED VIEW
- CREATE NETWORK POLICY
- CREATE NOTIFICATION INTEGRATION
- CREATE PASSWORD POLICY
- CREATE PIPE
- CREATE PROCEDURE
- CREATE REPLICATION GROUP
- CREATE RESOURCE MONITOR
- CREATE ROLE
- CREATE ROW ACCESS POLICY
- CREATE SCHEMA
- CREATE SECURITY INTEGRATION
- CREATE SECURITY INTEGRATION (External OAuth)
- CREATE SECURITY INTEGRATION (Snowflake OAuth)
- CREATE SECURITY INTEGRATION (SAML2)
- CREATE SECURITY INTEGRATION (SCIM)
- CREATE SEQUENCE
- CREATE SESSION POLICY
- CREATE SHARE
- CREATE STAGE
- CREATE STORAGE INTEGRATION
- CREATE STREAM
- CREATE TABLE
- CREATE | ALTER TABLE … CONSTRAINT
- CREATE TAG
- CREATE TASK
- CREATE USER
- CREATE VIEW
- CREATE WAREHOUSE
- DELETE
- DESCRIBE <object>
- DESCRIBE DATABASE
- DESCRIBE EXTERNAL TABLE
- DESCRIBE FILE FORMAT
- DESCRIBE FUNCTION
- DESCRIBE INTEGRATION
- DESCRIBE MASKING POLICY
- DESCRIBE MATERIALIZED VIEW
- DESCRIBE NETWORK POLICY
- DESCRIBE PASSWORD POLICY
- DESCRIBE PIPE
- DESCRIBE PROCEDURE
- DESCRIBE RESULT
- DESCRIBE ROW ACCESS POLICY
- DESCRIBE SCHEMA
- DESCRIBE SEARCH OPTIMIZATION
- DESCRIBE SEQUENCE
- DESCRIBE SESSION POLICY
- DESCRIBE SHARE
- DESCRIBE STAGE
- DESCRIBE STREAM
- DESCRIBE TABLE
- DESCRIBE TASK
- DESCRIBE TRANSACTION
- DESCRIBE USER
- DESCRIBE VIEW
- DESCRIBE WAREHOUSE
- DROP <object>
- DROP CONNECTION
- DROP DATABASE
- DROP DATABASE ROLE
- DROP EXTERNAL TABLE
- DROP FAILOVER GROUP
- DROP FILE FORMAT
- DROP FUNCTION
- DROP INTEGRATION
- DROP MANAGED ACCOUNT
- DROP MASKING POLICY
- DROP MATERIALIZED VIEW
- DROP NETWORK POLICY
- DROP PASSWORD POLICY
- DROP PIPE
- DROP PROCEDURE
- DROP REPLICATION GROUP
- DROP RESOURCE MONITOR
- DROP ROLE
- DROP ROW ACCESS POLICY
- DROP SCHEMA
- DROP SEQUENCE
- DROP SESSION POLICY
- DROP SHARE
- DROP STAGE
- DROP STREAM
- DROP TABLE
- DROP TAG
- DROP TASK
- DROP USER
- DROP VIEW
- DROP WAREHOUSE
- EXECUTE IMMEDIATE
- EXECUTE TASK
- EXPLAIN
- GET
- GRANT DATABASE ROLE
- GRANT DATABASE ROLE … TO SHARE
- GRANT OWNERSHIP
- GRANT <privileges>
- GRANT <privilege> … TO SHARE
- GRANT ROLE
- INSERT
- INSERT (multi-table)
- LIST
- MERGE
- PUT
- REMOVE
- REVOKE DATABASE ROLE
- REVOKE DATABASE ROLE … FROM SHARE
- REVOKE <privileges>
- REVOKE <privilege> … FROM SHARE
- REVOKE ROLE
- ROLLBACK
- SELECT
- SET
- SHOW <objects>
- SHOW COLUMNS
- SHOW CONNECTIONS
- SHOW DATABASE ROLES
- SHOW DATABASES
- SHOW DATABASES IN FAILOVER GROUP
- SHOW DATABASES IN REPLICATION GROUP
- SHOW DELEGATED AUTHORIZATIONS
- SHOW EXTERNAL FUNCTIONS
- SHOW EXTERNAL TABLES
- SHOW FAILOVER GROUPS
- SHOW FILE FORMATS
- SHOW FUNCTIONS
- SHOW GLOBAL ACCOUNTS
- SHOW GRANTS
- SHOW INTEGRATIONS
- SHOW LOCKS
- SHOW MANAGED ACCOUNTS
- SHOW MASKING POLICIES
- SHOW MATERIALIZED VIEWS
- SHOW NETWORK POLICIES
- SHOW OBJECTS
- SHOW ORGANIZATION ACCOUNTS
- SHOW PARAMETERS
- SHOW PASSWORD POLICIES
- SHOW PIPES
- SHOW PRIMARY KEYS
- SHOW PROCEDURES
- SHOW REGIONS
- SHOW REPLICATION ACCOUNTS
- SHOW REPLICATION DATABASES
- SHOW REPLICATION GROUPS
- SHOW RESOURCE MONITORS
- SHOW ROLES
- SHOW ROW ACCESS POLICIES
- SHOW SCHEMAS
- SHOW SEQUENCES
- SHOW SESSION POLICIES
- SHOW SHARES
- SHOW SHARES IN FAILOVER GROUP
- SHOW SHARES IN REPLICATION GROUP
- SHOW STAGES
- SHOW STREAMS
- SHOW TABLES
- SHOW TAGS
- SHOW TASKS
- SHOW TRANSACTIONS
- SHOW USER FUNCTIONS
- SHOW USERS
- SHOW VARIABLES
- SHOW VIEWS
- SHOW WAREHOUSES
- TRUNCATE MATERIALIZED VIEW
- TRUNCATE TABLE
- UNDROP <object>
- UNDROP DATABASE
- UNDROP SCHEMA
- UNDROP TABLE
- UNDROP TAG
- UNSET
- UPDATE
- USE <object>
- USE DATABASE
- USE ROLE
- USE SCHEMA
- USE SECONDARY ROLES
- USE WAREHOUSE
- DDL (Data Definition Language) Commands
- DML (Data Manipulation Language) Commands
- Query Syntax
- Query Operators
- SQL Function Reference
- Snowflake Scripting Reference
- API Reference
- Appendices
SHOW SHARES¶
Provider sharing not enabled for all accounts
Provider sharing is enabled by default for most, but not all accounts.
If you encounter errors when attempting to share data with consumers, the feature may not be enabled for your account. To inquire about enabling it, please contact Snowflake Support.
Lists all shares available in the system:
Outbound shares (to consumers) that have been created in your account (as a provider).
Inbound shares (from providers) that are available for your account to consume.
- See also:
Syntax¶
SHOW SHARES [ LIKE '<pattern>' ]
Parameters¶
LIKE 'pattern'
Filters the command output by object name. The filter uses case-insensitive pattern matching, with support for SQL wildcard characters (
%
and_
).For example, the following patterns return the same results:
... LIKE '%testing%' ...
... LIKE '%TESTING%' ...
Usage Notes¶
The command lists shares only for users with a role that has the IMPORT SHARE privilege:
By default, the ACCOUNTADMIN role has this privilege.
A user with the ACCOUNTADMIN role can delegate this privilege. See Enabling non-ACCOUNTADMIN Roles to Perform Data Sharing Tasks.
If a user without the IMPORT SHARE privilege runs this command, no shares are listed.
Note
Executing this command without sufficient privileges returns empty results.
The command does not require a running warehouse to execute.
The command returns a maximum of 10K records for the specified object type, as dictated by the access privileges for the role used to execute the command; any records above the 10K limit are not returned, even with a filter applied.
To view results for which more than 10K records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.
To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.
Output¶
The
kind
column displays:INBOUND
indicates the share is available to your account to consume (i.e. you can create a database from the share).OUTBOUND
indicates that your account is sharing data with other accounts and this share was created in your account.
For
OUTBOUND
shares, if accounts have been added to the share, theto
column displays these accounts. The maximum number of accounts displayed in this column is three; however, there is no hard limit on the number of accounts that can be added to a share.
Examples¶
Show all shares that have been created in your account or are available to consume by your account:
SHOW SHARES; +-------------------------------+----------+-------------------------+-----------------------+------------------+--------------+----------------------------------------+ | created_on | kind | name | database_name | to | owner | comment | |-------------------------------+----------+-------------------------+-----------------------+------------------+--------------+----------------------------------------| | 2016-07-09 19:18:09.821 -0700 | INBOUND | SFC_SAMPLES.SAMPLE_DATA | SNOWFLAKE_SAMPLE_DATA | | | Sample data sets provided by Snowflake | | 2017-06-15 17:02:29.625 -0700 | OUTBOUND | AB67890.SALES_S | SALES_DB | XY12345, YZ23456 | ACCOUNTADMIN | | +-------------------------------+----------+-------------------------+-----------------------+------------------+--------------+----------------------------------------+