0
0
Snowflakecloud~10 mins

Data marketplace and listings in Snowflake - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Data marketplace and listings
Create Data Marketplace
Add Data Listings
Publish Listings
Users Browse Listings
Users Request Access
Grant or Deny Access
Users Query Data
Marketplace Logs Usage
This flow shows how a data marketplace is created, listings are added and published, users browse and request access, and then query data with usage logged.
Execution Sample
Snowflake
CREATE DATA MARKETPLACE my_marketplace;
CREATE DATA LISTING my_listing ON MARKETPLACE my_marketplace
  AS SELECT * FROM sales_data;
PUBLISH DATA LISTING my_listing;
-- User queries listing
SELECT * FROM my_marketplace.my_listing;
This code creates a data marketplace, adds a data listing from a table, publishes it, and then a user queries the listing.
Process Table
StepActionObjectState ChangeResult
1Create marketplacemy_marketplaceMarketplace createdmy_marketplace exists
2Create data listingmy_listingListing added to marketplacemy_listing linked to sales_data
3Publish listingmy_listingListing publishedmy_listing visible to users
4User browses listingsmy_marketplaceListings displayedmy_listing shown
5User requests accessmy_listingAccess request loggedPending approval
6Grant accessmy_listingAccess grantedUser can query listing
7User queries listingmy_listingQuery executedData from sales_data returned
8Log usagemy_listingUsage recordedQuery logged for billing
9End--Process complete
💡 Process ends after user queries data and usage is logged.
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 6Final
my_marketplaceNoneCreatedCreatedCreatedCreatedCreated
my_listingNoneNoneCreated (unpublished)PublishedPublishedPublished with user access
User AccessNoneNoneNoneNoneGrantedGranted
Usage LogsEmptyEmptyEmptyEmptyEmptyContains query log
Key Moments - 3 Insights
Why can't users query the data listing before it is published?
Because as shown in step 3 and 7 of the execution_table, the listing must be published to be visible and accessible for querying. Before publishing, the listing is not available to users.
What happens if access is not granted after a user requests it?
According to step 5 and 6, if access is not granted, the user cannot query the listing. The listing remains inaccessible until approval is given.
How is usage tracked in the marketplace?
Step 8 shows that after a user queries data, the marketplace logs the usage for billing and auditing purposes.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step is the data listing made visible to users?
AStep 5
BStep 2
CStep 3
DStep 7
💡 Hint
Check the 'State Change' column for when the listing becomes published and visible.
According to variable_tracker, what is the state of 'User Access' after Step 4?
AGranted
BNone
CPending
DRevoked
💡 Hint
Look at the 'User Access' row and the column 'After Step 4' in variable_tracker.
If the listing was never published, what would happen at Step 7 when the user tries to query?
AQuery fails due to no access
BQuery returns empty result
CQuery returns data
DQuery logs usage anyway
💡 Hint
Refer to the execution_table steps 3 and 7 about publishing and querying.
Concept Snapshot
Data Marketplace and Listings in Snowflake:
- Create a marketplace with CREATE DATA MARKETPLACE.
- Add listings with CREATE DATA LISTING linked to source data.
- Publish listings to make them visible.
- Users browse and request access.
- Access must be granted before querying.
- Usage is logged for billing and auditing.
Full Transcript
This visual execution trace shows how a data marketplace is created in Snowflake, how data listings are added and published, and how users interact with the marketplace. The marketplace is first created, then listings are added from existing data tables. Listings must be published to be visible to users. Users browse listings and request access. Access must be granted before users can query the data. Each query is logged for usage tracking. The variable tracker shows the state changes of the marketplace, listings, user access, and usage logs at each step. Key moments clarify why publishing is necessary before querying and how access controls work. The quiz tests understanding of when listings become visible, user access state, and query behavior if listings are unpublished.