Loading data from Snowflake Marketplace
1. Loading data from Snowflake Marketplace
One of the fastest and easiest ways of getting data into Snowflake is the Snowflake Marketplace. The Snowflake Marketplace is where you can share, discover, and access a wide variety of ready-to-query datasets. In fact, in the first module of this course, you loaded data from the Snowflake Marketplace, so you're already familiar with it. I love datasets that come from the Marketplace because I don't need to worry about personally maintaining the data. Datasets are completely owned and maintained by the provider, meaning that keeping the data fresh and up-to-date is the provider's responsibility. In short, it's essentially a live dataset. All you have to do is decide that you want to use the data and then load it into your Snowflake account using the friendly UI. There's such a wide variety of diverse datasets on the Marketplace, and this is great because chances are there's a dataset there that can help you power what you're trying to build. For example, let's say you were tasked with delivering a high-quality dataset that is going to be used to train a machine learning model. You're told that the model should be able to make accurate sales predictions and that it should account for variations in the weather. Perhaps there's a suspicion that weather impacts sales in this specific use case. You could find relevant and accurate weather data on the Marketplace and easily bring the data into your account to help you tailor the training data for the model. It's very common to browse the Marketplace for relevant and ready-to-use data that you can load into your Snowflake account. If you quickly browse the Marketplace, you'll see AI and ML data, economic data, government data, and much more. Oftentimes, that data is used to enrich data you're working with or to power a specific use case that you're trying to address. Let's load some data from the Snowflake Marketplace into your account. Remember, this is a hands-on course, and I'd like for you to follow along with me as much as you can throughout the course. This is how you get hands-on, practical experience using Snowflake. It's a good time to make sure you're logged into your Snowflake account. Feel free to pause the video now if you need to log into your account. Okay, start by navigating to Data Products on the left-hand side of the interface and click Marketplace. You'll notice that I'm now in the Snowflake Marketplace, and I can find all sorts of data listings here. Some free, some paid, from all sorts of providers. Let's search for a data set. At the top, search for weather source LLC colon frostbite. Click on the first result returned. You're now on the page for this data listing. If you take a look at the listing, you'll see that this data set is a collection of all sorts of global weather and climate data. You can also see an overview of exactly what's included, example queries against the data set, and more. Let's load this data set into your account. Click on Get. A modal should appear along with an options drop-down menu, and if you expand the menu, you'll see you have the option to rename the data set and also specify which roles in your account should have access to the data. Let's rename the data set to frostbite underscore weather source in all caps. Be sure to do this or subsequent code won't execute as intended. You can leave the roles option as is. Next, load the data by clicking Get. Excellent. If successful, you'll see a modal like this one. I think what's neat is that I can immediately start querying the data as soon as it's been loaded. Click on Query Data. This will open a new SQL worksheet with some pre-written SQL queries for you created by the provider. The queries are typically exploratory in nature, meaning you can use them to explore the data set a bit. Let's quickly run one of the provider's pre-written queries. I'll run the very first query at the top. This query will let us know what the weather will be like in Boston next weekend, and you can see this from the comment right above the query. You can see in the results pane that I get several weather metrics for the city of Boston for the upcoming weekend. Pretty cool. On the left, you can explore the structure of the data share by clicking frostbite weather source. You can see that we actually didn't load just a data set. We loaded a database that includes a schema called on point ID, and that schema has lots of views containing data that we can use. Now let's run our own SQL query. Open a new SQL worksheet. Hover over the on point ID schema. Click the three dots and click set worksheet context. This will quickly set the worksheet context, which will let the worksheet know which data set we plan to run queries against. You can see the updated context reflected in the worksheet here. In the GitHub repository for this course, navigate to the module two folder and open the frostbite weather source SQL file. Copy everything within the file and paste it into the worksheet. Click run all. The results include the average temperature and total precipitation for cities in France. Cool. That was pretty easy. Let's quickly recap what we covered in this video. You learned that it's common practice to enrich your data with high quality data for all sorts of different use cases, like training machine learning models, as an example. You learned how to access a snowflake marketplace, which is where you can find high quality data sets that are continuously maintained by the data set provider. You loaded the data from the snowflake marketplace in just a matter of seconds and also ran some SQL queries to explore the data. This is just one of the quick and easy ways of loading data into your snowflake environment without needing to leave the snowflake data cloud. Next, we'll perform ingestion using snowflakes web interface, Snowsight.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.