Bird
Raised Fist0
Snowflakecloud~5 mins

Data marketplace and listings in Snowflake - Commands & Configuration

Choose your learning style10 modes available
Introduction
A data marketplace lets you find and use data shared by others easily. Listings show available data sets you can explore and use in your Snowflake account.
When you want to find external data sets to enrich your business reports without building your own data pipelines.
When you need to share your data securely with partners or customers using Snowflake's platform.
When you want to browse and subscribe to data products offered by other organizations.
When you want to manage and control access to shared data listings within your Snowflake account.
When you want to quickly integrate third-party data into your analytics without manual data transfers.
Commands
This command lists all available data marketplace listings you can browse and subscribe to in your Snowflake account.
Terminal
SHOW DATA MARKETPLACE LISTINGS;
Expected OutputExpected
name | provider_name | description | created_on ---------------------|---------------|--------------------------------|--------------------- weather_data_listing | WeatherCorp | Global weather data sets | 2024-05-01 10:00:00 stock_prices_listing | FinanceInc | Historical stock prices | 2024-04-15 09:30:00
This command switches your session to use the selected data marketplace listing so you can query its data.
Terminal
USE DATA MARKETPLACE LISTING weather_data_listing;
Expected OutputExpected
Using data marketplace listing 'weather_data_listing'.
This command queries the first 5 rows from the global weather data set in the selected marketplace listing.
Terminal
SELECT * FROM weather_data_listing.global_weather LIMIT 5;
Expected OutputExpected
date | location | temperature | precipitation -----------|-------------|-------------|-------------- 2024-06-01 | New York | 25 | 0.0 2024-06-01 | London | 18 | 1.2 2024-06-01 | Tokyo | 22 | 0.5 2024-06-01 | Sydney | 15 | 0.0 2024-06-01 | Mumbai | 30 | 0.0
This command gives the data_analyst role permission to use the weather_data_listing data marketplace listing.
Terminal
GRANT USAGE ON DATA MARKETPLACE LISTING weather_data_listing TO ROLE data_analyst;
Expected OutputExpected
Grant succeeded.
Key Concept

If you remember nothing else, remember: data marketplace listings let you find and use shared data sets easily inside Snowflake.

Common Mistakes
Trying to query data from a marketplace listing without switching to it first.
Snowflake requires you to set the active data marketplace listing before querying its data.
Run USE DATA MARKETPLACE LISTING listing_name; before querying data from that listing.
Not granting proper roles access to the data marketplace listing.
Without permissions, users cannot query or use the shared data.
Use GRANT USAGE ON DATA MARKETPLACE LISTING listing_name TO ROLE role_name; to give access.
Summary
Use SHOW DATA MARKETPLACE LISTINGS; to see available shared data sets.
Switch to a listing with USE DATA MARKETPLACE LISTING listing_name; before querying its data.
Grant roles access with GRANT USAGE ON DATA MARKETPLACE LISTING to control who can use the data.

Practice

(1/5)
1. What is the primary purpose of a data marketplace in Snowflake?
easy
A. To group data listings for easy sharing and discovery
B. To store raw data files permanently
C. To run complex SQL queries faster
D. To manage user access permissions

Solution

  1. Step 1: Understand the role of a data marketplace

    A data marketplace is designed to organize and share data listings so users can find and use data easily.
  2. Step 2: Compare options with this purpose

    Options A, B, and D describe other Snowflake features but not the marketplace's main role.
  3. Final Answer:

    To group data listings for easy sharing and discovery -> Option A
  4. Quick Check:

    Marketplace = Group data listings [OK]
Hint: Marketplaces group data listings for sharing [OK]
Common Mistakes:
  • Confusing marketplace with data storage
  • Thinking marketplace speeds up queries
  • Mixing marketplace with access control
2. Which SQL command correctly and safely creates a new data marketplace named my_marketplace in Snowflake?
easy
A. CREATE NEW MARKETPLACE my_marketplace;
B. CREATE DATA MARKETPLACE my_marketplace;
C. CREATE MARKETPLACE my_marketplace;
D. CREATE MARKETPLACE IF NOT EXISTS my_marketplace;

Solution

  1. Step 1: Recall correct syntax for creating marketplace

    Snowflake uses CREATE MARKETPLACE [IF NOT EXISTS] name; to create marketplaces safely.
  2. Step 2: Check each option

    CREATE MARKETPLACE my_marketplace; lacks IF NOT EXISTS and will fail if the marketplace already exists; Options B and D use invalid syntax; CREATE MARKETPLACE IF NOT EXISTS my_marketplace; is correct and safe.
  3. Final Answer:

    CREATE MARKETPLACE IF NOT EXISTS my_marketplace; -> Option D
  4. Quick Check:

    CREATE MARKETPLACE IF NOT EXISTS = safe creation [OK]
Hint: Use IF NOT EXISTS to avoid errors creating marketplace [OK]
Common Mistakes:
  • Adding extra keywords like DATA or NEW
  • Omitting IF NOT EXISTS causing errors if exists
  • Using incorrect command structure
3. Given the SQL query:
SHOW LISTINGS IN MARKETPLACE my_marketplace;

What will this command do?
medium
A. Create a new listing inside my_marketplace
B. Delete all listings from my_marketplace
C. Display all data listings available in the marketplace named my_marketplace
D. Show all marketplaces in the account

Solution

  1. Step 1: Understand the SHOW LISTINGS command

    This command lists all data listings inside a specified marketplace.
  2. Step 2: Match command with options

    Display all data listings available in the marketplace named my_marketplace matches the command's purpose; Options A and C describe create/delete actions which SHOW does not do; Show all marketplaces in the account shows all marketplaces in the account, not listings.
  3. Final Answer:

    Display all data listings available in the marketplace named my_marketplace -> Option C
  4. Quick Check:

    SHOW LISTINGS = list data sets [OK]
Hint: SHOW LISTINGS lists data sets in a marketplace [OK]
Common Mistakes:
  • Confusing SHOW with CREATE or DELETE
  • Thinking it lists marketplaces instead of listings
  • Assuming it modifies data
4. You run the command:
CREATE LISTING my_listing IN MARKETPLACE my_marketplace;

But get an error saying the marketplace does not exist. What is the most likely cause?
medium
A. The marketplace my_marketplace was not created before creating the listing
B. The listing name my_listing is invalid
C. You need to use DROP MARKETPLACE before CREATE LISTING
D. Listings cannot be created inside marketplaces

Solution

  1. Step 1: Analyze the error message

    The error says the marketplace does not exist, so the system cannot find my_marketplace.
  2. Step 2: Check command dependencies

    You must create the marketplace before adding listings inside it. If missing, this error occurs.
  3. Final Answer:

    The marketplace my_marketplace was not created before creating the listing -> Option A
  4. Quick Check:

    Create marketplace first, then listing [OK]
Hint: Create marketplace before listings to avoid errors [OK]
Common Mistakes:
  • Assuming listing name causes error
  • Trying to drop marketplace before listing
  • Believing listings can't be inside marketplaces
5. You want to share a dataset with external users by creating a listing in a marketplace. Which sequence of commands correctly achieves this?
hard
A. CREATE LISTING my_listing; CREATE MARKETPLACE my_marketplace; GRANT USAGE ON MARKETPLACE my_marketplace TO ROLE external_role;
B. CREATE MARKETPLACE my_marketplace; CREATE LISTING my_listing IN MARKETPLACE my_marketplace; GRANT USAGE ON LISTING my_listing TO ROLE external_role;
C. CREATE MARKETPLACE my_marketplace; GRANT USAGE ON MARKETPLACE my_marketplace TO ROLE external_role; CREATE LISTING my_listing IN MARKETPLACE my_marketplace;
D. GRANT USAGE ON LISTING my_listing TO ROLE external_role; CREATE MARKETPLACE my_marketplace; CREATE LISTING my_listing IN MARKETPLACE my_marketplace;

Solution

  1. Step 1: Create the marketplace first

    You must create the marketplace before adding listings inside it.
  2. Step 2: Create the listing inside the marketplace

    After marketplace creation, create the listing specifying the marketplace.
  3. Step 3: Grant usage on the listing to external users

    Granting usage on the listing allows external roles to access the shared data.
  4. Final Answer:

    CREATE MARKETPLACE my_marketplace; CREATE LISTING my_listing IN MARKETPLACE my_marketplace; GRANT USAGE ON LISTING my_listing TO ROLE external_role; -> Option B
  5. Quick Check:

    Create marketplace -> listing -> grant usage [OK]
Hint: Create marketplace, then listing, then grant access [OK]
Common Mistakes:
  • Creating listing before marketplace
  • Granting usage before creating listing
  • Granting usage on marketplace instead of listing
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