Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,000 --> 00:00:02,000
Instructor: All right, so we just walked through
2
00:00:02,000 --> 00:00:04,000
how to stack some tables together
3
00:00:04,000 --> 00:00:06,000
using the Query Editor append tools
4
00:00:06,000 --> 00:00:09,000
and we took these three individual sales data files
5
00:00:09,000 --> 00:00:12,000
from 2022, '21, and '20 and combined them
6
00:00:12,000 --> 00:00:15,000
into a new appended data set, right,
7
00:00:15,000 --> 00:00:18,000
where we stacked all three of them on top of each other.
8
00:00:18,000 --> 00:00:19,000
And that worked pretty well.
9
00:00:19,000 --> 00:00:20,000
But remember the downside,
10
00:00:20,000 --> 00:00:23,000
this new table we created is now dependent
11
00:00:23,000 --> 00:00:26,000
on three individual component tables.
12
00:00:26,000 --> 00:00:29,000
So we can't delete any of these individual tables
13
00:00:29,000 --> 00:00:33,000
or if we need to add in new years worth of data,
14
00:00:33,000 --> 00:00:35,000
like, we'll have to reconfigure the append
15
00:00:35,000 --> 00:00:35,000
to make that work.
16
00:00:35,000 --> 00:00:38,000
So, again, it's just, it works decently
17
00:00:38,000 --> 00:00:40,000
but it doesn't scale very well.
18
00:00:40,000 --> 00:00:42,000
So what we're gonna do here
19
00:00:42,000 --> 00:00:45,000
is we're gonna actually delete these four sales queries
20
00:00:45,000 --> 00:00:47,000
and then we're gonna use Power BI
21
00:00:47,000 --> 00:00:50,000
and connect to a folder instead, right?
22
00:00:50,000 --> 00:00:53,000
So first things first, we can delete this append query
23
00:00:55,000 --> 00:00:58,000
and then once that's removed, we can actually start removing
24
00:00:58,000 --> 00:01:01,000
our individual sales data files, right?
25
00:01:01,000 --> 00:01:05,000
Because now, they're not referencing any other queries.
26
00:01:05,000 --> 00:01:07,000
And delete 2021.
27
00:01:09,000 --> 00:01:14,000
And then our last file here for 2022, we'll delete that.
28
00:01:15,000 --> 00:01:18,000
All right, and we're good to go here.
29
00:01:18,000 --> 00:01:19,000
So now that we've done that,
30
00:01:19,000 --> 00:01:22,000
we're left with our six kind of main lookup tables
31
00:01:22,000 --> 00:01:25,000
that we're gonna be using to build out our data model.
32
00:01:25,000 --> 00:01:26,000
And from here, what we want to do
33
00:01:26,000 --> 00:01:28,000
is we actually want to go in
34
00:01:28,000 --> 00:01:31,000
and connect to a new source, right?
35
00:01:31,000 --> 00:01:32,000
That's gonna be that folder.
36
00:01:32,000 --> 00:01:34,000
And I quickly want to show you
37
00:01:34,000 --> 00:01:36,000
what's contained within that folder.
38
00:01:36,000 --> 00:01:39,000
So I'm gonna navigate to that folder on my desktop.
39
00:01:40,000 --> 00:01:41,000
All right, so this is the folder
40
00:01:41,000 --> 00:01:44,000
where we've got all of the AdventureWorks data
41
00:01:44,000 --> 00:01:47,000
and I have this sales data folder here.
42
00:01:47,000 --> 00:01:48,000
I double click into this,
43
00:01:48,000 --> 00:01:51,000
you'll see that we've got our three sales tables
44
00:01:51,000 --> 00:01:54,000
for 2022, '21, and '20 within here.
45
00:01:54,000 --> 00:01:56,000
And this is what we're gonna be connecting to
46
00:01:56,000 --> 00:01:59,000
from the Power BI folder data source.
47
00:01:59,000 --> 00:02:02,000
So we'll jump back to the Query Editor
48
00:02:02,000 --> 00:02:05,000
and we'll come up here to a new source,
49
00:02:05,000 --> 00:02:08,000
and I'm gonna click more for more options.
50
00:02:08,000 --> 00:02:10,000
All right, and from the Get Data window,
51
00:02:10,000 --> 00:02:12,000
you actually see we've got our folder option right here.
52
00:02:12,000 --> 00:02:14,000
We can click connect
53
00:02:14,000 --> 00:02:18,000
and the Query Editor prompts us with the folder path.
54
00:02:18,000 --> 00:02:21,000
Click browse to browse your file structure.
55
00:02:22,000 --> 00:02:25,000
Right, desktop, Adventure Works Raw Data,
56
00:02:25,000 --> 00:02:27,000
and then our sales data, right?
57
00:02:27,000 --> 00:02:30,000
So this is the file path that we want.
58
00:02:30,000 --> 00:02:31,000
Click okay.
59
00:02:31,000 --> 00:02:33,000
And again, this is gonna follow that same process
60
00:02:33,000 --> 00:02:35,000
where it's gonna bring up a data preview window.
61
00:02:35,000 --> 00:02:38,000
We'll be able to check out what that data looks like.
62
00:02:38,000 --> 00:02:40,000
Now, what's interesting here is this preview window
63
00:02:40,000 --> 00:02:42,000
looks a little bit different, right?
64
00:02:42,000 --> 00:02:45,000
It's got this content column that says binary.
65
00:02:45,000 --> 00:02:48,000
It's got file names, and extensions,
66
00:02:48,000 --> 00:02:50,000
and date accessed, and modified.
67
00:02:51,000 --> 00:02:53,000
It's got the folder path string.
68
00:02:53,000 --> 00:02:55,000
So rather than actually previewing the data,
69
00:02:55,000 --> 00:02:58,000
the actual rows and the columns,
70
00:02:58,000 --> 00:03:01,000
what we're actually previewing are the files that exist
71
00:03:01,000 --> 00:03:03,000
within the folder path, right?
72
00:03:03,000 --> 00:03:05,000
So it's a little bit different here
73
00:03:05,000 --> 00:03:06,000
but a similar process, right?
74
00:03:06,000 --> 00:03:09,000
And we've got two options as well.
75
00:03:09,000 --> 00:03:11,000
We can combine and transform
76
00:03:11,000 --> 00:03:13,000
or we can just transform the data.
77
00:03:13,000 --> 00:03:14,000
Either one of these options
78
00:03:14,000 --> 00:03:17,000
is gonna kind of put us into the same spot,
79
00:03:17,000 --> 00:03:19,000
but I'm gonna click transform data
80
00:03:19,000 --> 00:03:21,000
so we can walk through each of these steps.
81
00:03:22,000 --> 00:03:24,000
So here we go, we pressed edit,
82
00:03:24,000 --> 00:03:26,000
we're back in our Query Editor,
83
00:03:26,000 --> 00:03:29,000
and we see that similar kind of view
84
00:03:29,000 --> 00:03:30,000
that we got in preview, right?
85
00:03:30,000 --> 00:03:33,000
We got content and the name,
86
00:03:33,000 --> 00:03:35,000
our file extension, date modified,
87
00:03:35,000 --> 00:03:39,000
created our folder path, and all that kind of stuff.
88
00:03:39,000 --> 00:03:41,000
So again, we're still not looking at data points here.
89
00:03:41,000 --> 00:03:44,000
We're still looking at the attributes of the files
90
00:03:44,000 --> 00:03:46,000
that exist within that folder that we've linked to.
91
00:03:47,000 --> 00:03:50,000
The key here is the first column.
92
00:03:50,000 --> 00:03:52,000
And this column is kind of similar to the column
93
00:03:52,000 --> 00:03:54,000
that was created when we merged tables
94
00:03:54,000 --> 00:03:56,000
where we had to take one extra step
95
00:03:56,000 --> 00:04:00,000
to actually split out the columns from the table itself.
96
00:04:00,000 --> 00:04:02,000
It's the same idea here.
97
00:04:02,000 --> 00:04:05,000
So you can see when I hover, it says, "Combine Files."
98
00:04:05,000 --> 00:04:07,000
And when we press this,
99
00:04:07,000 --> 00:04:11,000
it runs through a different append process.
100
00:04:11,000 --> 00:04:15,000
So once Power BI finishes that behind the scenes process,
101
00:04:15,000 --> 00:04:17,000
we're brought to this new window
102
00:04:17,000 --> 00:04:19,000
with this combine files header.
103
00:04:19,000 --> 00:04:21,000
And this looks like the data preview that we were seeing
104
00:04:21,000 --> 00:04:25,000
when we brought in our individual sales data tables, right?
105
00:04:25,000 --> 00:04:26,000
Our order and stock dates, order number,
106
00:04:26,000 --> 00:04:29,000
product key, customer key, you know,
107
00:04:29,000 --> 00:04:31,000
order line items, order quantity, right?
108
00:04:31,000 --> 00:04:34,000
So this all looks very familiar.
109
00:04:34,000 --> 00:04:35,000
The other thing that's interesting here too
110
00:04:35,000 --> 00:04:37,000
is if you click on the sample file,
111
00:04:37,000 --> 00:04:39,000
the default is the first file
112
00:04:39,000 --> 00:04:40,000
that you've connected to, right?
113
00:04:40,000 --> 00:04:41,000
So 2020.
114
00:04:41,000 --> 00:04:44,000
But you can actually click through and view previews
115
00:04:44,000 --> 00:04:46,000
based on the other data tables
116
00:04:46,000 --> 00:04:48,000
that are contained within that folder, right?
117
00:04:48,000 --> 00:04:51,000
So this is just another great way to kind of go in
118
00:04:51,000 --> 00:04:54,000
and check to make sure that column structures
119
00:04:54,000 --> 00:04:57,000
and all of that stuff is the exact same.
120
00:04:57,000 --> 00:04:58,000
All right, so everything looks good here,
121
00:04:58,000 --> 00:04:59,000
kind of checks out.
122
00:04:59,000 --> 00:05:01,000
We've got 2021 for our order date.
123
00:05:01,000 --> 00:05:03,000
From here, we're gonna click okay.
124
00:05:05,000 --> 00:05:07,000
All right, we've got a whole bunch
125
00:05:07,000 --> 00:05:08,000
of different applied steps here
126
00:05:08,000 --> 00:05:10,000
that were automatically generated.
127
00:05:10,000 --> 00:05:14,000
If we check out our order date column here, we can load more
128
00:05:16,000 --> 00:05:20,000
and we can actually see, so we've got 2020, 2021, 2022,
129
00:05:20,000 --> 00:05:22,000
all the way through June, right?
130
00:05:22,000 --> 00:05:24,000
So everything looks good there.
131
00:05:24,000 --> 00:05:27,000
Our column structure is all the exact same
132
00:05:27,000 --> 00:05:30,000
with the exception of this new source name column.
133
00:05:30,000 --> 00:05:33,000
And what this column is doing is it just tells us
134
00:05:33,000 --> 00:05:37,000
which file from within the folder that the data came from.
135
00:05:37,000 --> 00:05:39,000
So it's potentially a helpful attribute
136
00:05:39,000 --> 00:05:40,000
if you do want to keep it.
137
00:05:40,000 --> 00:05:43,000
In this case, we really don't need it
138
00:05:43,000 --> 00:05:46,000
so let's go ahead and we can remove this column
139
00:05:46,000 --> 00:05:47,000
from our sales data table.
140
00:05:48,000 --> 00:05:49,000
And there you have it.
141
00:05:49,000 --> 00:05:51,000
We have our appended table
142
00:05:51,000 --> 00:05:53,000
containing all of our sales data in one place.
143
00:05:53,000 --> 00:05:55,000
And as you can probably see here,
144
00:05:55,000 --> 00:05:58,000
it gave us an automatic table name
145
00:05:58,000 --> 00:06:00,000
that's based on the folder, right?
146
00:06:00,000 --> 00:06:02,000
So our folder name was Sales Data, right?
147
00:06:02,000 --> 00:06:05,000
So we could update this if we wanted to.
148
00:06:05,000 --> 00:06:07,000
Honestly, I think that this is a great name for it
149
00:06:07,000 --> 00:06:09,000
so we're gonna leave it as is.
150
00:06:09,000 --> 00:06:10,000
One last thing to note here,
151
00:06:10,000 --> 00:06:12,000
over on the left hand side of the screen
152
00:06:12,000 --> 00:06:13,000
where the queries are,
153
00:06:13,000 --> 00:06:15,000
is we've got a whole bunch of other detail
154
00:06:15,000 --> 00:06:19,000
and information that was automatically generated
155
00:06:19,000 --> 00:06:20,000
by the Query Editor.
156
00:06:20,000 --> 00:06:21,000
And basically, what this is
157
00:06:21,000 --> 00:06:24,000
is this is all of the behind the scenes stuff
158
00:06:24,000 --> 00:06:27,000
that Power BI needed to do in order to append
159
00:06:27,000 --> 00:06:30,000
those three files together from that folder.
160
00:06:30,000 --> 00:06:32,000
So typically, what I'll do here
161
00:06:32,000 --> 00:06:34,000
is I'll just collapse these queries, right?
162
00:06:34,000 --> 00:06:36,000
And just kind of hide them.
163
00:06:36,000 --> 00:06:37,000
And that way, I can kind of stay focused
164
00:06:37,000 --> 00:06:40,000
on my other queries that I have here.
165
00:06:40,000 --> 00:06:42,000
We are ending up with that same end result
166
00:06:42,000 --> 00:06:46,000
as appending those three individuals tables together,
167
00:06:46,000 --> 00:06:49,000
except now, we've got one nice clean table
168
00:06:49,000 --> 00:06:53,000
without all of those extra tables and dependencies.
169
00:06:53,000 --> 00:06:54,000
And even more importantly,
170
00:06:54,000 --> 00:06:58,000
if we ever needed to pull in additional years of sales data,
171
00:06:58,000 --> 00:07:02,000
we could simply drop those CSV files right into that folder,
172
00:07:02,000 --> 00:07:04,000
press refresh right here inside the Query Editor
173
00:07:04,000 --> 00:07:07,000
and all of that data would be automatically pulled in.
174
00:07:07,000 --> 00:07:10,000
So that's just about do it here for this demo
175
00:07:10,000 --> 00:07:14,000
on connecting to data that's located in a folder.
176
00:07:14,000 --> 00:07:16,000
Let's come up here, we'll click close and apply.
177
00:07:16,000 --> 00:07:19,000
And Power BI is working on updating all of those changes
178
00:07:19,000 --> 00:07:22,000
that we made within the Query Editor.
179
00:07:22,000 --> 00:07:23,000
All right, so once this wraps up,
180
00:07:23,000 --> 00:07:26,000
we should see that sales data 2022 table disappear
181
00:07:26,000 --> 00:07:29,000
and just be updated with the sales data table.
182
00:07:29,000 --> 00:07:31,000
All right, so it looks like we're good to go here.
183
00:07:31,000 --> 00:07:33,000
And that's gonna wrap up your pro tip
184
00:07:33,000 --> 00:07:36,000
on connecting to data that's located in a folder.
14519
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.