$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
SnowflakeintermediateNew

Snowflake Data Sharing

Share

Set up secure data sharing and data marketplace listings

Works with OpenClaude

You are a Snowflake data platform engineer. The user wants to set up secure data sharing between Snowflake accounts and create marketplace listings.

What to check first

  • Run SELECT CURRENT_ACCOUNT(), CURRENT_REGION(); to confirm your account and region details
  • Verify you have ACCOUNTADMIN or SYSADMIN role: SELECT CURRENT_ROLE();
  • Check existing shares: SHOW SHARES; and SHOW MANAGED ACCOUNTS;

Steps

  1. Create a share object using CREATE SHARE share_name; — this is the container for shared data
  2. Grant usage on the share to specify which account can access it: ALTER SHARE share_name ADD ACCOUNTS = xyz12345; (use 12-character account identifier)
  3. Create or identify the database containing data to share, then grant database privileges: GRANT USAGE ON DATABASE shared_db TO SHARE share_name;
  4. Grant schema-level access: GRANT USAGE ON SCHEMA shared_db.public TO SHARE share_name;
  5. Grant SELECT on specific tables: GRANT SELECT ON TABLE shared_db.public.customer_data TO SHARE share_name;
  6. For marketplace listings, set share comments and enable: ALTER SHARE share_name SET COMMENT = 'Customer analytics dataset';
  7. Consumer account accepts share by running CREATE DATABASE db_from_share USING SHARE producer_account.share_name;
  8. Validate consumer access with SELECT COUNT(*) FROM db_from_share.public.customer_data;

Code

-- Producer account: Create and configure share
CREATE SHARE analytics_share COMMENT = 'Customer behavioral analytics dataset';

-- Add consumer account (replace with actual account ID)
ALTER SHARE analytics_share ADD ACCOUNTS = xy12345678901;

-- Grant database and schema access
GRANT USAGE ON DATABASE analytics_db TO SHARE analytics_share;
GRANT USAGE ON SCHEMA analytics_db.shared_schema TO SHARE analytics_share;

-- Grant table-level permissions
GRANT SELECT ON TABLE analytics_db.shared_schema.customers TO SHARE analytics_share;
GRANT SELECT ON TABLE analytics_db.shared_schema.transactions TO SHARE analytics_share;

-- Grant select on view for computed metrics (recommended over raw tables)
GRANT SELECT ON VIEW analytics_db.shared_schema.customer_metrics TO SHARE analytics_share;

-- Verify share configuration
SHOW SHARES;
DESC SHARE analytics_share;

-- Consumer account: Accept incoming share
CREATE DATABASE shared_analytics 
  USING SHARE producer_account_id.analytics_share;

-- Validate access
SELECT * FROM shared_analytics.shared_schema.customers LIMIT 10;

-- Query shared data without copying (zero-copy)
SELECT 
  customer_id,
  COUNT(*) as transaction_count,
  SUM(amount) as total_spent
FROM shared_analytics.shared_schema.transactions
GROUP BY customer_id;

--

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategorySnowflake
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
snowflakedata-sharingmarketplace

Install command:

curl -o ~/.claude/skills/snowflake-sharing.md https://clskills.in/skills/snowflake/snowflake-sharing.md

Related Snowflake Skills

Other Claude Code skills in the same category — free to download.

Want a Snowflake skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.