Bird
Raised Fist0
Snowflakecloud~10 mins

Why data sharing eliminates data copies in Snowflake - Visual Breakdown

Choose your learning style10 modes available
Process Flow - Why data sharing eliminates data copies
Data Provider Creates Share
↓
Share Contains Reference to Data
↓
Consumer Accesses Shared Data
↓
No Data Copy Made
↓
Consumer Queries Data Directly
↓
Data Provider Maintains Single Source
Data sharing works by creating a reference to the original data, so consumers access the same data without making copies.
Execution Sample
Snowflake
CREATE SHARE my_share;
GRANT USAGE ON DATABASE my_db TO SHARE my_share;
-- Consumer: SHOW SHARES LIKE 'my_share';
This code creates a share and grants access to a database without copying data.
Process Table
StepActionData Copy Created?Result
1Provider creates share objectNoShare references original data
2Provider grants USAGE on database to shareNoShare can access data
3Consumer uses the shareNoConsumer sees data via reference
4Consumer queries dataNoData read directly from provider's storage
5Provider updates dataNoConsumer sees updated data immediately
6Consumer disconnectsNoNo data copies remain
💡 No data copies are made because sharing uses references, not duplication.
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4Final
Share ObjectNoneCreatedGranted AccessUsed by ConsumerActive ReferenceExists
Data CopyNoneNoneNoneNoneNoneNone
Consumer AccessNoneNoneNoneConnectedQueryingDisconnected
Key Moments - 3 Insights
Why doesn't the consumer get a separate copy of the data?
Because the share only contains a reference to the provider's data, no duplication happens (see execution_table steps 1-4).
What happens if the provider updates the data after sharing?
The consumer sees the updated data immediately since they access the same source (see execution_table step 5).
Does disconnecting the consumer remove the shared data?
No, the share object and data remain with the provider; only the consumer's access ends (see execution_table step 6).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step does the consumer start querying data?
AStep 4
BStep 2
CStep 3
DStep 5
💡 Hint
Check the 'Action' and 'Result' columns in execution_table rows for when querying starts.
According to variable_tracker, what is the state of 'Data Copy' after step 4?
APending
BCreated
CNone
DDeleted
💡 Hint
Look at the 'Data Copy' row under 'After Step 4' in variable_tracker.
If the provider updates data, what does the consumer see according to the execution_table?
AOld data until consumer reconnects
BUpdated data immediately
CNo data until share is recreated
DA copy of updated data
💡 Hint
Refer to execution_table step 5 'Result' column.
Concept Snapshot
Data sharing creates a reference, not a copy.
Provider creates a share and grants access.
Consumer queries data directly from provider storage.
Updates by provider reflect immediately.
No extra storage used for copies.
Full Transcript
Data sharing in Snowflake works by creating a share object that references existing data. The provider creates the share and grants USAGE on the database. The consumer then uses this share to query data directly without any data copy being made. This means the consumer always sees the latest data as maintained by the provider. When the consumer disconnects, no copies remain because none were created. This efficient method saves storage and keeps data consistent.

Practice

(1/5)
1. What is the main reason data sharing in Snowflake eliminates the need for data copies?
easy
A. Because data is automatically deleted after sharing
B. Because users access the same data directly without duplicating it
C. Because data is encrypted before sharing
D. Because each user gets a personal copy of the data

Solution

  1. Step 1: Understand data sharing concept

    Data sharing allows multiple users or accounts to access the same dataset without creating separate copies.
  2. Step 2: Identify how data copies are avoided

    Since users query the shared data directly, no extra storage is used for duplicates.
  3. Final Answer:

    Because users access the same data directly without duplicating it -> Option B
  4. Quick Check:

    Data sharing = no data copies [OK]
Hint: Data sharing means one data source accessed by many [OK]
Common Mistakes:
  • Thinking data is copied for each user
  • Confusing encryption with data copying
  • Assuming data is deleted after sharing
2. Which Snowflake object is used to share data without creating copies?
easy
A. Secure share
B. Database clone
C. Data warehouse
D. Stage

Solution

  1. Step 1: Identify Snowflake sharing object

    Snowflake uses a 'secure share' object to share data securely without copying.
  2. Step 2: Differentiate from other objects

    Database clones create copies; warehouses process queries; stages store files. Only secure shares share data without copies.
  3. Final Answer:

    Secure share -> Option A
  4. Quick Check:

    Secure share = data sharing without copies [OK]
Hint: Secure share shares data without copying it [OK]
Common Mistakes:
  • Confusing clones with shares
  • Thinking warehouses share data
  • Mixing stages with data sharing
3. If Account A shares a table with Account B using Snowflake's data sharing, what happens when Account B queries the table?
medium
A. Account B queries a copy stored in its own storage
B. Account B must first copy the table to its account
C. Account B cannot query the table directly
D. Account B queries the original table in Account A's storage

Solution

  1. Step 1: Understand shared table access

    When Account B queries a shared table, it accesses the original data stored in Account A's storage.
  2. Step 2: Confirm no data copying occurs

    Snowflake's sharing avoids copying by letting Account B query data directly from Account A's storage.
  3. Final Answer:

    Account B queries the original table in Account A's storage -> Option D
  4. Quick Check:

    Shared data queried from original storage [OK]
Hint: Shared data is queried from original account storage [OK]
Common Mistakes:
  • Assuming data is copied to Account B
  • Thinking Account B must copy before querying
  • Believing Account B cannot query shared data
4. A user tries to share a table but accidentally creates a clone instead. What is the main problem with this approach?
medium
A. The clone shares data without copying
B. The clone automatically deletes original data
C. The clone creates a full copy, using extra storage
D. The clone cannot be queried

Solution

  1. Step 1: Understand difference between clone and share

    A clone creates a full copy of the data, which uses additional storage space.
  2. Step 2: Identify the problem with cloning for sharing

    Cloning duplicates data, defeating the purpose of sharing without copies.
  3. Final Answer:

    The clone creates a full copy, using extra storage -> Option C
  4. Quick Check:

    Clone duplicates data, uses storage [OK]
Hint: Clone copies data; share does not [OK]
Common Mistakes:
  • Thinking clone shares data without copying
  • Believing clone cannot be queried
  • Assuming clone deletes original data
5. How does Snowflake's data sharing ensure data consistency for all consumers without creating copies?
hard
A. By letting all consumers query the same live data in the provider's account
B. By copying data to each consumer and syncing changes regularly
C. By exporting data to external files for each consumer
D. By restricting access to only one consumer at a time

Solution

  1. Step 1: Understand data consistency in sharing

    Snowflake shares data by allowing all consumers to query the same live data in the provider's account.
  2. Step 2: Explain how copies affect consistency

    Copies can become outdated; sharing live data avoids this problem and keeps data consistent.
  3. Step 3: Confirm no copies are made

    Since no copies are created, all consumers see the same up-to-date data instantly.
  4. Final Answer:

    By letting all consumers query the same live data in the provider's account -> Option A
  5. Quick Check:

    Live shared data keeps consistency [OK]
Hint: Shared live data keeps everyone consistent [OK]
Common Mistakes:
  • Thinking data is copied and synced
  • Assuming data is exported to files
  • Believing only one consumer can access at a time
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard