Getting started with the Snowflake PT-1: Trial and connecting Tableau
I've never touched a database outside Tableau, so come bumble through Snowflake with me from the very first trial sign-up.
- Don't start the Snowflake 30-day trial until you genuinely have time to invest in it, otherwise you waste the clock sitting idle
- Snowflake is now cloud-agnostic — you can run it on AWS, Google Cloud or Azure, and pick a region close to your existing storage
- Connecting Tableau to Snowflake requires manually downloading and installing the ODBC driver from Snowflake's help menu, as it isn't bundled with Tableau
- Warehouses are the compute layer separate from data storage, so you can spin up multiple warehouses (e.g. for analytics vs data science teams) to avoid resource clashes and monitor usage
- The query history tab lets you see exactly what Tableau sends to Snowflake, including warehouse used, duration and row limits, which complements Tableau's own performance recording
- Why I'm sharing this learning journey0:00
- The Zero to Snowflake guide and my data plans1:33
- Setting up the free trial account2:59
- Choosing edition, cloud and region5:26
- First look at the Snowflake interface8:27
- Installing the Snowflake ODBC driver for Tableau12:52
- Connecting Tableau and understanding warehouses14:29
- Building a data model on sample data19:12
- Reviewing query history and live performance23:36
- Wrapping up and next steps27:17
0:00Hey, it's Tim here. Today I'm doing
0:03something very different. I'm starting my
0:03learning journey on a
0:04database called Snowflake and I thought
0:06wouldn't it be cool if maybe I just shared
0:08my learning
0:09journey with you right from the start. So
0:12at this point I'm about a week in to being
0:14familiar with
0:15Snowflake. I've literally never touched any
0:17other database in my life other than
0:19working with it in
0:20Tableau and so if you're here because you
0:22want to know more about Snowflake and you
0:25want to hear
0:25that from someone who knows something, this
0:27is not the right place. This is very much
0:29going to be
0:30a series of me essentially just bumbling my
0:32way through Snowflake and learning as I go
0:35and
0:36essentially sharing that experience with
0:38you once a week. So yeah, once a week I'll
0:40basically share
0:41what I've learned and what I've done with
0:43Snowflake. It's a nice way to keep me
0:45honest
0:45actually so that I have to share something
0:48every week. That means I have to learn
0:50something every
0:51week. Siri's trying to learn with me here
0:53and the other thing is I think it's just
0:55interesting to be
0:56able to plot the learning journey. I never
0:58got a chance to plot that journey with
0:59Tableau because
1:00I sort of started at a point where I hadn't
1:02really thought about that question and now
1:04that I know
1:05how important it is to sort of plot your
1:07learning journey as you go along so you can
1:10see when you
1:11learn certain concepts or certain important
1:13things. I think this is a really useful way
1:16to do it so
1:17me making a video is very much just me
1:18sharing that process. So I know this won't
1:21be for everyone,
1:22I totally appreciate that, it might be only
1:24for the few people out there but if you're
1:26learning
1:26Snowflake and you're also going down the
1:28same journey then you can join along
1:29hopefully once
1:30a week to find out how this journey goes. I
1:32'm literally going to start by going through
1:35a
1:35resource I found on the Snowflake website.
1:37So just to give you an example, I'm on the
1:39Snowflake
1:40homepage here. Over here in resources they
1:43have a bunch of resources and one of the
1:45guides here,
1:46if I go to the guides page you'll see it
1:48loads up and they have these guides which
1:51are really,
1:51really good and the guide that I'm going to
1:53be following at least for the next few
1:54videos will
1:55be this one, Getting Started with Snowflake
1:57, Zero to Snowflake and essentially it's a
1:5912-part guide
2:01that gives you some resources and it's
2:02based on the 30-day trial. Now I'm also
2:05going to start on
2:06the 30-day trial but I'm actually going to
2:08continue using it into a paid model because
2:10I actually have a lot of my own data
2:11sources that I'd like to store somewhere
2:14especially around
2:15quantified self-data. So what I'm going to
2:17be doing is in these first 30 days I'm just
2:20going
2:20to be getting to know the database, getting
2:22to know how it all works, then I'll be
2:24loading my
2:24own data into Snowflake and that's what I
2:26'll use sort of going forward. Who knows in
2:28the future,
2:29maybe I'll even open up a particular part
2:31of Snowflake to you the community to have a
2:34go at
2:35and run my credit cards to the ground. So I
2:37need to learn a lot about Snowflake before
2:40I do that
2:40but other than that yeah this is it, this
2:42is going to be the journey. So I'll go back
2:44to the
2:45homepage and all I'm going to do in this
2:46video is set up a trial. We're going to
2:48connect it to
2:49Tableau because of course that's what I
2:50know and we're going to try and sort of
2:52just find our way
2:53around the interface then in the next video
2:54I'll actually start working through this
2:56guide in a
2:57meaningful way. Okay so let's go back to
2:59the home page and let's just set up a trial
3:01account. So this
3:02is something anyone can do, they've got a
3:03free 30-day trial. What I'd recommend is
3:05don't start
3:06your trial unless you have 30 days to
3:08really invest in this. I do because I'm
3:11partly learning this
3:12you know to try and go for certification
3:15but also it's something that we're getting
3:17very comfortable
3:18with in other contexts. So it's really
3:20important just to bear that in mind, don't
3:22start a 30-day
3:23trial if you're just going to sit on it for
3:2520 days and not use it. Watch a video,
3:27learn as much
3:28as you can from other people then when you
3:30have 30 days to invest in this in your
3:32business or
3:33personally then start the trial really
3:35learn it and try and get as much as you can
3:37out of it.
3:38Okay so enough talking, let's kick off our
3:40trial. I'm just going to go to the home
3:42page here,
3:42start the free trial. I have actually
3:45previously created another account but that
3:48was in a
3:48completely different context. This is going
3:51to be my own personal instance that I'm
3:52going to be
3:53using so I'm going to have to block out
3:55some of this information here so that you
3:57don't see that.
3:57I'm just going to be entering some
4:02information here and I'm actually going to
4:05be using this as
4:07if I'm a company if that makes sense
4:10because I have another use case for this
4:12which is I have
4:13a lot of metadata that's created from all
4:15my YouTube videos and everything like that.
4:17So what
4:17I'd actually like to do is load some of
4:19that metadata into something like Snowflake
4:21, Somewhere
4:22Central so that it can be used by lots of
4:24other things. So that will include talking
4:26to things
4:27like the YouTube API, it will include
4:29metadata that comes out of my video editing
4:31software,
4:32it will also include metadata about the
4:34files that I'm using behind the scenes and
4:36basically just
4:36knowing where it all is and then also
4:38knowing where it's stored. So essentially I
4:40'd like to
4:40store that metadata somewhere structured so
4:43that I can easily search it find it and
4:45should something
4:45ever happen to all of this stuff then I can
4:48have a very good sort of snapshot of what
4:50is where and
4:51you know the information that's sitting
4:53behind all this. It's also a nice way of
4:55thinking about
4:55making your content portable. Let's say one
4:58day I decide to move all my content off
5:00YouTube,
5:00having the data ready to go in Snowflake
5:02will make it very easy for me to pivot to
5:04another system
5:05that will drive the same thing you've seen
5:08everywhere using a different database. Not
5:11necessarily Snowflake but it will just make
5:12it a nice central place to to keep it. So
5:14that's sort
5:16of where my thinking is. I don't really
5:17know where I'm going to take this but for
5:19now let's just use
5:20it and use it as if we are setting it up
5:23like a company. So let's go ahead and
5:26continue. You get
5:28a couple of options here to choose your
5:30Snowflake edition. Now I don't really know
5:32what's going on
5:34so I'm going to start with standard. I'm
5:36not going to kick off like an enterprise
5:39trial or anything
5:40like that and this is not really business
5:42critical seeing as this information I've
5:44kind of lived
5:45without it as it were. So at least in these
5:4730 days I don't need anything serious. If I
5:50have to
5:50change that obviously we'll do another
5:52video and we'll talk a bit about that. One
5:54of the nice things
5:54is that Snowflake lets you choose which
5:57cloud you run on. Now they're very much not
5:59supporting the
6:00private cloud concept. They've very much
6:02gone for the public cloud concept. They've
6:03sort of you know
6:04hedge their bets on that. So you get a
6:06choice actually. Now a few years ago when I
6:09used Snowflake
6:09very very briefly just as a database to
6:12connect to it in Tableau you only had AWS
6:14but recently
6:15they've brought on Google Cloud Platform on
6:17Microsoft Azure which makes it a nice cloud
6:19agnostic platform which is really nice to
6:21sort of see. So let's go ahead and choose
6:23AWS. The reason
6:24I'm choosing AWS because that is literally
6:26the thing I know the most. So if I'm going
6:28to be
6:28working with it that's what I'm going to
6:30use. I also have a lot of information on
6:32Amazon S3 which
6:34I store information like my podcast is
6:37stored on AWS on S3 and I'm going to use
6:40Ireland as my
6:41zone because again that's where lots of the
6:43stuff that I already store in AWS is stored
6:45. So we're
6:46just going to try and see how that goes and
6:47of course if anything is wrong with us then
6:49I'll
6:49obviously have the learning challenge of
6:51changing these things at some point. I'm
6:53seeing that's
6:54possible so we'll just have to figure out
6:56how to do that. So let's get started. Now
6:59the next thing
6:59we'll do is account setup is in progress. I
7:01think this just happens very very quick.
7:03They have a
7:04getting started video, some virtual hands-
7:06on, the account is created. I'll just blank
7:09out my email
7:09in this particular section. Full Snowflake
7:12documentation. Now I don't know about you
7:14but
7:14I never read documentation. I normally go
7:16straight into these things and hope that
7:19there's some sort
7:19of started template or started database
7:22that I can just connect to and of course I
7:24use Tableau
7:25so I'm not going to be querying data. I'm
7:26just going to open up Tableau see if I can
7:28connect to it
7:29in this video and then we'll just see sort
7:31of what everything is about and start to
7:34get our
7:34feel around the platform. Just sort of mess
7:36around initially before we open up
7:38documentation and see
7:39how it goes. So there we go. We've sent an
7:42email to my email so let me just open up a
7:44new tab and
7:45go to my email. My other email here is a
7:48Gmail email so let's just go to that. I'll
7:51blank out
7:52this bit because there's a lot of personal
7:54information on the screen and I want to
7:55make
7:55sure that it's not shared with everyone. So
7:59here's the email. Basically my account is
8:02ready to go.
8:03Click here to activate it. I think they're
8:05just making sure I'm a legitimate human
8:07being,
8:07not just spinning up lots of AWS clusters.
8:09And now here's the thing. I've already
8:11created an
8:12account before on another account trial
8:14which has not necessarily ended that sort
8:17of in a work
8:17context essentially so I'm not going to be
8:19using that. I'm going to use my own setup
8:22so I'm going
8:22to blank out everything here if you're
8:24wondering why it's all faded out. So there
8:26we go finally got
8:27it. Let's get started. So yeah we there we
8:30've created our account. You'll notice a few
8:33things
8:33straight away. Let me just add this to my
8:36password. When we log in it's really
8:39obvious sort of
8:40where everything is because you see here
8:43you get some sort of EU West one. This is
8:46essentially
8:47calling out the AWS zone that I think your
8:49Snowflake instance is running on. I think
8:51it
8:52uses the same naming structure as AWS
8:54essentially in that case. And you also have
8:57your own sort of
8:59Snowflake instance here as well that's at
9:01the top. I'm going to blank out sort of the
9:03first part of
9:03that just so that it's not shared with
9:05everyone. And yeah you get this really nice
9:08welcome guide
9:08that basically kind of gets you to try and
9:10do a few things. I'm actually going to
9:12minimize this
9:13because I know this is actually available
9:14to me later on. If I actually close that
9:16and go to help
9:17here you can see that you get this sort of
9:20nice sort of getting started panel. And if
9:23you go to
9:23that show help panel and take a tour it
9:25actually gets you back to this getting
9:27started page. So I
9:29know I've got this available to me. We'll
9:31try it a little later on once I've got
9:32going. But I just
9:33want to connect to this in Tableau. I want
9:35to see if there's a database that I can
9:36work with ready
9:37to go template one that I can work with and
9:39just see if everything's connecting up and
9:41running okay.
9:42So let's go ahead and minimize this. It's
9:44calling out at me left right and center.
9:46And you can see here we do actually get
9:49some information. We've got a demo db.
9:52If I click on that and let's just go into
9:54each of these and see what's going on. We
9:57get a few
9:57bits of information. Let's just go to this
10:00other Snowflake sample data. Here we go. I
10:03think this is
10:03actually what I'm interested in. We've got
10:06this sort of sample data and I believe
10:08these are
10:09basically different sort of working at
10:12different scales. So the first one is very
10:15small data. I
10:16think we're talking about a thousand rows.
10:18This is about ten thousand and so on and so
10:20forth. And I
10:21think the hundred one is actually a million
10:23records. This one's like a billion and so
10:25on
10:25and so forth. And then there's some really
10:27really large data. And then there's
10:28obviously this weather
10:29database here which gives you lots of
10:31different levels of granularity of
10:33information which is also
10:34kind of handy. So you can get a nice feel
10:36for lots of different situations here but
10:39they've loaded it
10:39up with something that we can sort of get
10:41to get to grip to and start to understand.
10:43Which is good.
10:44Which is good. I really like that. If we
10:45just browse around at the top we've got
10:47databases
10:48which shows us the three databases we just
10:50saw. You've got a utility database, a demo
10:53database.
10:54I think the utility database basically has
10:57information about essentially, well it
11:00doesn't
11:00have anything in here right now at the
11:02moment. No tables, no views. But I think it
11:04has information
11:05about our Snowflake instance essentially.
11:07So again I don't know what I'm talking
11:09about so I just hope
11:10that's correct. If I go to shares I think
11:13what happens here is you can share parts of
11:15your data
11:16with other people and then they can go and
11:18essentially use that data but they're using
11:20the data on your Snowflake instance. So the
11:23use case here would be imagine you wanted
11:25to share
11:26data with let's say you're a bank and you
11:28want to share data with a credit reference
11:31agency.
11:31Now what you don't want to do is send them
11:33a CSV file or send them the hard files
11:34because what
11:35they'll do is they'll ingest that into
11:36their database and it becomes their data.
11:38So what you
11:39can do with Snowflake shares is you can
11:40essentially give that credit reference
11:42agency access to your
11:44Snowflake instance to run certain comput
11:45ations. Then you can see what they're quer
11:47ying, you can
11:48see what they're using and you can sort of
11:50control that with all the same permissions
11:52that you'd like
11:52to use. So I think that's what that is.
11:55Data marketplace I assume this is for Snow
11:57flake partners
11:58and other sort of hookins to connect to
12:01Snowflake warehouses. This is I don't
12:04really know what
12:05warehouses are but I think this is to do
12:07with the infrastructure that sits behind
12:09your Snowflake
12:10database essentially. So they have sort of
12:13varying levels of sort of performance and
12:16compute which is
12:17what it's called in computer terms. So that
12:19's something that we can look at a little
12:21later on.
12:21Worksheets I guess this is where you run
12:23your queries I'm assuming that's what it is
12:25and the
12:25history tab which just shows us everything
12:27that's happening but of course we've not
12:29done anything so
12:31we can't really see anything here and at
12:33the moment I'm at sysadmin level. I can
12:37obviously go
12:37to a much higher level but this is pretty
12:40much everything I need to know. There's
12:42nothing else
12:43here that I sort of really need to worry
12:45about so what I'm going to do is I'm just
12:47going to
12:47I'm going to leave everything as is I'm not
12:49going to close this trial notification.
12:51What I'm going
12:52to do is I'm just going to fire up Tableau
12:53and see if we can connect to this straight
12:55away. Now
12:56one thing I will say is that when we
12:58connect to Snowflake there is sometimes a
13:02couple of things
13:02that we need to sort of make sure we do.
13:05The one thing that I've noticed with Table
13:07au if I just go
13:08to the Tableau tab you can see I'm sort of
13:10like a deer in headlights here. If I just
13:13go to Tableau
13:14Snowflake driver the first time I did this
13:17I can't remember the exact steps I did off
13:19the top of my
13:20head but you actually have to go and make
13:22sure that you've got the driver installed
13:24it's not just
13:25something that comes pre-installed with
13:27Tableau. So you just go to driver download
13:30page and you
13:30essentially download the driver but you
13:32have to download it from a specific place
13:34in Snowflake so
13:35it's not something that Tableau have
13:37available here. So if I just go to Snow
13:39flake down here
13:40I'm on a Mac on a 64-bit you'll see here
13:43that you sign into your Snowflake instance
13:45select help
13:46download an ODBC driver so that's where I
13:48was trying to go to. So Snowflake help
13:51download and
13:52then you've got your ODBC driver and JDBC
13:55driver if you want to but ODBC driver is
13:58there and you
13:59can download the specific one you want you
14:01in this case I just clicked on this one for
14:03Mac and I went
14:04to Mac 64 and I downloaded the latest
14:07driver which is 2.23 here once you've
14:10downloaded that and
14:11install that ODBC driver everything will
14:14work pretty pretty easily okay and so once
14:16you're done
14:17with that you just basically go back to
14:18your Snowflake instance so here we are and
14:20essentially
14:21need a couple of bits of information you
14:24need to know your username your password
14:25and so on and so
14:26forth so let's go ahead and just try that
14:29so let's just open up Tableau if I can
14:31actually spell it
14:32Tableau2020.4 that's what I'm going to use
14:35for this one and it's actually quite
14:36interesting in 2021.1
14:39is going to be the addition of Snowflake
14:41spatial support so once I've got my ducks
14:43in a row we'll
14:44obviously share that feature at some point
14:46so let's go over here to a server let's
14:48select
14:49Snowflake and let's see what it asks for
14:51and then we'll go to Snowflake and see if
14:53we can find that
14:54information so let's just wait and see so
14:56here you can see I've got some information
14:58from a previous
15:00bit of stuff that I did so let's just
15:02remove all of that and let's just go grab
15:04our server so our
15:05server I'm assuming I'm assuming our server
15:08is indeed this one here at the top so I'm
15:10just gonna
15:11I'm just going to yeah I'm gonna I'm just
15:13gonna grab this I'm just gonna have a guess
15:14and say okay
15:15this is the server and I hope this is right
15:18and if it's not right then we might have to
15:21go and try some of that tutorial content
15:25that they've got username for this one I
15:29think I'm
15:29going to be this one tab below Tim, tmmd
15:34and the password is going to be I think
15:39this one okay let's
15:41hit enter hit sign in and we'll just wait
15:44for this to load and boom there we go that
15:47worked so it's
15:48pretty pretty straightforward of course I
15:50've set up the free trial so there's no
15:51permissions or
15:52anything to worry about and so here I can
15:54select my warehouse and you can see I've
15:57only got the
15:57one warehouse so that kind of leads me to
16:00believe that if I go in here I can actually
16:03set up
16:04different warehouses over time so here I've
16:06got this particular warehouse it's an x
16:08small and
16:10it's got an auto suspend of 10 minutes so
16:11okay I'm starting to get more about this so
16:14essentially
16:14what happens is the data is stored in one
16:16place but then when you need to access that
16:19data it uses
16:20a compute system and the compute system is
16:22based on this concept of warehouses now I
16:25can set up
16:25multiple warehouses to connect to the same
16:28data and so what that allows me to do is
16:30say gives
16:31an analytics team really powerful access to
16:33this because they need to do lots of comput
16:35ations
16:36very very quickly I can give a data science
16:38team separate access to the same data using
16:41a separate
16:42warehouse and that will essentially mean
16:44two things number one I can monitor how it
16:46's being
16:46used very very easily but also it means
16:49that those two teams whenever clash on
16:50resources if they're
16:51doing work at the same time maybe the
16:53analytical team is doing business critical
16:56work whereas a
16:56data science team is you know doing explor
16:59atory work so it needs to run really big
17:01queries on
17:01data and meets and we need to make sure
17:03that that doesn't take down the work the
17:04analytical team is
17:05doing so essentially what you can do is you
17:08can set up different warehouses essentially
17:12that all
17:12have different sort of levels of computing
17:14and I'm not going to go ahead and create
17:16anything
17:17ridiculous here because some of these get
17:19pretty expensive now the credit system I
17:22don't know too
17:23much about pricing so of course we'll find
17:25that out maybe I'll try and cover that in
17:26the next
17:26three videos but essentially here we're on
17:29x small which is one credit per hour
17:31essentially and two
17:32credits per hour so and these credits refer
17:34to how long you've been running them so we
17:36can you
17:37can set something up we can set something
17:39like let's set up a medium here and let's
17:42call this
17:43medium and we'll call this medium
17:46underscore I don't think it likes hyphens
17:49so let's just try
17:51this and it does like underscores it doesn
17:53't mind underscores so let's just call
17:54medium warehouse
17:55auto suspend of 10 minutes essentially if
17:58it's idle for 10 minutes it will
18:00automatically stop
18:01you can set that to a lower number I'll set
18:03that to five just me using this so if I'm
18:06not doing
18:06something for five minutes that's fine but
18:08you've got to be careful because if it
18:10takes five minutes
18:12if after five minutes it kills it but then
18:14it takes two minutes to fire it up you're
18:16being
18:16charged for that two minutes and so you
18:18might just want to tweak that so I might
18:19just leave this to
18:20default just to make sure that I don't sort
18:22of do something that seems unreasonable but
18:24defaults
18:25normally tend to make sense so let's just
18:26hit finish and then you'll see here that I
18:28have two
18:29warehouses and this won't turn up in table
18:31au until I've actually refreshed this
18:33connection so it's
18:35there and you'll see that it's started it's
18:38currently active I'd actually now like to
18:41use
18:41that because it's active so what I'll do is
18:43I'll edit the connection we'll go in here
18:46sign in again
18:47and what that will do is it should refresh
18:49this list there you go we've got the medium
18:51warehouse
18:51and now you can see I created a new
18:53warehouse and we're pretty much good to go
18:55so now if I select a
18:56database it's going to be the same data
18:58that's available I haven't created a new
19:00database I just
19:01selected a new warehouse and so if I go to
19:03the snowflake sample data I think this is
19:06where we
19:07have the sample data that we can sort of
19:09use and we can just get going essentially
19:11so yeah this is
19:12the data at sort of different levels I'll
19:14connect to the 100 and that's the one with
19:16sort of I think
19:17a million rows of data and you can see here
19:20that we have a very simple data set so what
19:22I'm going
19:22to do in tableau is I'm just going to try
19:24and create like a data model just to sort
19:26of work with
19:27and see how this works so let's just have a
19:29look at this we've got um if we've got
19:30orders so if I
19:31just drag that in I always start with the
19:33orders database because that seems to be
19:35always like a
19:36really sort of standard data set so we've
19:38got an order key customer key and order
19:40status and there's
19:42no other key there so we've just got two
19:45sort of keys here order key so let's try
19:47and see what else
19:48we can use so the customer let's bring the
19:51customer and I'm assuming the customer key
19:53is going to be
19:54the same in both of those so let's go ahead
19:57and select those two c and o customer key
20:00perfect
20:01let's close that so now we've got our first
20:03data model there if I select the customer
20:05table
20:06we can see here the customer key is in
20:08there we've used that already we've got a
20:10nation key
20:11um so let's go ahead and get the nation
20:13table and just let's connect that up and
20:15that's just where I
20:16tend to build data models I just I just
20:17tend to connect them up like this because
20:19it it sort of
20:20makes the most sense and then if there's
20:21something wrong I just start taking them
20:23apart so nation key
20:24is there I can see there's a region key and
20:27the nation key so let's go ahead and grab
20:29the region
20:29and put that there this might be the
20:31completely the wrong way to do this but as
20:33I just said
20:34uh this is how I just like to sort of
20:36create these and just play with them so we
20:38've got
20:38orders customer nation and region that's
20:40four tables done already the other thing we
20:43had is
20:43we had an order key and so let's look at
20:46this line item table to see if we have
20:48anything there
20:49before I drag it in um it will obviously do
20:52some querying and now all of this is should
20:54be pinging
20:54my snowflake instance essentially so um if
20:57I just sort of look at this I want to see
20:59if there's an
21:00order key column here that I can relate to
21:03there's a comment there we go is uh there's
21:06an order key
21:07just there so I think we can use that order
21:09key to essentially bring in the line items
21:12for this
21:12particular order so let's go ahead and do
21:14that so let's just put this here on a new
21:17uh um sort of
21:18logical layer as it were so we're going to
21:21get the order key and we're going to
21:23connect it with
21:24the line item order key and that should be
21:27that okay and so the line item has a part
21:30key and a
21:30supplier key so here we go um we can
21:33actually bring these two separately so the
21:36part key I
21:37think I'm going to put this here and the
21:39part key uh if we just make sure this
21:41actually lines up with
21:43this and just close that so I'm just
21:45creating relationship essentially and then
21:48there seems
21:48to be a supplier list and there's a
21:51separate part supplier list so the line
21:54item and supply key so
21:55what I think is the supplier here refers to
21:57the line item so if I bring the supplier
21:59just there
22:00and we just basically say that the line
22:04item supplier key uh is equal to the uh
22:09what is this
22:10the supplier key supplier key okay um it's
22:13kind of weird namings right so I think I
22:16think that's how
22:16it works and then the part supplier key
22:19goes right here because I think the parts
22:22can be provided by
22:23different supplier and the line item itself
22:26can come from a different supplier so the
22:28best way to
22:29think of this is listen you could buy your
22:31line item from a wholesaler who is a
22:33supplier but then
22:34that item might be made from a range of
22:36parts that come from different parts
22:39supplies okay so I think
22:40that's how this is working so um let's say
22:43the part key and is part supply key is
22:46there and then um
22:48interestingly there's another one which is
22:51ps supply key and so I think I think
22:55actually this
22:55this might be this might be um might create
22:58a bit of a weird reference because I think
23:00the sub key here just if I just update this
23:03now just so I can get this information
23:06and supply key over here I think can also
23:11relate to the supplier key over here so let
23:15's just have
23:15a quick preview of that by hitting update
23:18now and yeah so we it does look like they
23:20are completely
23:21different keys um to be honest I won't
23:23really know until I go into tableau so
23:25there's my model
23:27and I've just I'm not sure this is even
23:29right and if I was doing this for real I'd
23:31probably spend a
23:32lot more time now all of this has been
23:33hitting the snowflake database we almost
23:35forgot this is
23:36a snowflake video so let's go back here and
23:38let's have a look at our history and see
23:40what's been
23:41going on so the last time this was
23:43refreshed is 908 let's just refresh that
23:45and let's see what's
23:46been going on wow so there we go all that
23:49work has been sort of triggering um
23:51requests into snowflake
23:53and you can immediately see what's going on
23:55um you can see we're working on the medium
23:57uh warehouse
23:58here uh you can see the duration of some of
24:00these query if I go into some of these
24:02query you can see
24:03that this is essentially um the queries
24:05that I'm running as I create the
24:06relationships essentially
24:08tableau's sort of looking at everything and
24:10it's limiting it to a thousand rows because
24:13that is
24:13actually if I just um uh sort of collapse
24:16my browser and just annotate to here you
24:18can see
24:18that this limit is essentially this
24:21thousand rows item here so uh really cool
24:23that you can see all
24:24this stuff um it's funny because you can do
24:26all this in performance recording in table
24:27au
24:28and but it's also nice to see it here in
24:29snowflakes you can actually see what the
24:31database sees
24:32from tableau so it's something that not
24:34many people do quite often so you can see
24:36that I
24:36created my medium compute when I connected
24:39initially um and then I actually sorry I
24:42created
24:42the medium warehouse but initially I
24:44connected to the normal compute now there
24:46was a little bit uh
24:48something strange going in here um
24:49initially I don't know what that status
24:51means I'll have to dig
24:52into that at some point in the future um
24:54but you can see here the sort of scale of
24:56the data that's
24:57being scanned um it's kind of interesting
24:59there's actually quite a lot of information
25:01so let's go
25:02into tableau and just see how many rows of
25:04data this actually is the best way to do
25:07this is to
25:08actually maybe just go to the order table
25:11and just let's see if we can do a count of
25:13orders here and
25:14see how many rows come back so 150 million
25:18rows that's crazy so 150 million orders um
25:21on the
25:22orders table alone and then obviously as we
25:24start to bring a few other things out um
25:26then it's going
25:27to get even more and more busy so lots and
25:29lots of data here um but this isn't the
25:31purpose of this I
25:32just wanted to sort of you know connect to
25:35it in tableau and just see sort of how it
25:37worked um what
25:38we can do is we can start to maybe try and
25:40build um uh something so let's just see how
25:43many orders
25:44come into different countries so let's go
25:46ahead and drag nation name into this query
25:49and we'll
25:50just wait for it to run on 150 million rows
25:53this is querying live over the AWS
25:55infrastructure
25:56and you can see that it's generally
25:58speaking roughly five million rows per
26:00country which
26:01is actually um fairly realistic in this set
26:04and then what we can do is we can maybe
26:06also grab the
26:07region and just break that down by region I
26:08think the region is going to be more more
26:11of a continent
26:12rather than like a nation so if I just put
26:14that in front of the nation name and get
26:16that query running
26:17again um hopefully we'll get something a
26:19little bit more useful and there we go yes
26:22I was right
26:23the region is more of a continent item and
26:25then everything else is is just to do with
26:27the order
26:28and so what is interesting here is we can
26:30actually start to see how this works in
26:32real life so you
26:33can see here I'm connected live I'm not I'm
26:36not doing an extract or anything if I try
26:38to take an
26:38extract um that would sort of be you know a
26:40really expensive extract on 150 million
26:43rows so the sort
26:44of benefit here is to not take an extract
26:46try and use the power of snowflake to you
26:48know get it to
26:49perform really really quick and if it's not
26:51quick enough up your compute and get it
26:53working even
26:54faster okay so that you are spending less
26:56time querying and now if I update this we
26:58should see
26:58a few more of my queries so previously I
27:01was down here and now you can see that this
27:04is up there you
27:05can even see the ODBC version of the driver
27:07I have installed you can see I had 2.23
27:10obviously you can
27:11see who's querying it it's just me there's
27:13no one else on this instance so that's
27:15pretty much it so
27:17yeah really cool that's all I wanted to do
27:19in this video set up the trial connect to
27:21it in Tableau
27:22and see what it was spawning in the
27:24background and and so this isn't a snow
27:26flake this is a
27:27snowflake instance I'm going to keep for
27:29good um even past the trial so I'll become
27:31a paying
27:32customer and see how this goes because as I
27:34said I have a lot of my own data that I'd
27:35love to store
27:36in here and start to see how I use that
27:38more efficiently okay so that's it for this
27:40video I
27:41think I'm going to stop here because um so
27:43far this has been a pretty nice process and
27:45what I
27:46don't want to do is start bumbling around
27:47everywhere um in the next video what I will
27:50probably do is I'll start working through
27:52this guide and trying to sort of really get
27:54to grips
27:55with what they've um sort of showed what I
27:57'll probably do is I'll probably just um I
28:00'll probably
28:00structure a video that you know isn't
28:02boring just me reading this guide so what I
28:04'll try and do is
28:04probably um go through the guide maybe
28:06offline and then once I'm familiar with the
28:09guide and I've done
28:10it once I can actually go through it in
28:11earnest so I'll read the guide understand
28:13what I'm going to go
28:14through and then we'll actually record the
28:16video and go through that so yeah um I hope
28:18you enjoy
28:19this video if you'd be interested to you
28:20know keep watching these videos and learn
28:22more about
28:23snowflake as I do that myself then great I
28:25'm trying to work up to a snow snowflake
28:28certification
28:29of some sort um I always don't think cert
28:31ifications are necessary but they are a nice
28:33milestone to
28:34sort of mark your understanding of a
28:35particular topic and it's good to have some
28:37sort of incentive
28:38to to sort of try and do something so yeah
28:40this is it I'm sort of holding myself to
28:42account here
28:43publicly so if you don't see another video
28:45from me in a week's time about snowflake
28:47then by all means
28:48get in my inbox complain to me that I haven
28:50't launched a video and yeah that's it if
28:53you've
28:53enjoyed this video you know what to do
28:54please like subscribe share this video with
28:57anyone you think
28:57might find it useful otherwise I'll catch
29:00you in the next video all right take it
29:02easy
Future-proof your career https://n1d.io
| My Courses on Linkedin Learning: https://www.linkedin.com/learning/instructors/tim-ngwena In this video, we start on a journey to learn Snowflake, a cloud-based database. I n this video we set up a trial and connect it up to Tableau.
0:00 Intro
1:35 What I’ll cover in this video
3:39 Setting up a trial
8:40 First sign in
12:38 Connecting Tableau to Snowflake
14:43 Setting up your data model in Tableau
23:32 Checking the queries and resources used by Snowflake
27:24 Summary and conclusions Share feedback and Suggestions: https://tableautim.canny.io/suggestions -
Join this channel to get access to perks:
https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw/join ----------
(C) 2023 TN-Media LTD. No re-use, unauthorized use, or redistribution, of this video without prior permission.