WEBVTT

00:00.120 --> 00:05.460
OK, so now I'm going to show you how to graph noontime time series as your data in.

00:06.090 --> 00:10.760
OK, so long time series data is data that doesn't have timestamps.

00:10.800 --> 00:17.010
So for example, in the last video, I'm on my SQL server here logging into to Moscow if I select all

00:17.010 --> 00:20.430
from my two status order by time est descending limit.

00:20.430 --> 00:20.820
10.

00:20.850 --> 00:23.370
All these values have a timestamp.

00:23.400 --> 00:27.270
OK, so this is from the last VIDEO In this video, I'm going to show you how to graph this kind of

00:27.270 --> 00:30.370
data where the data is just names and values.

00:30.390 --> 00:35.280
There's no timestamp there, and you'll find tables, autism databases where they are built just to

00:35.280 --> 00:38.190
be a summary of statistics, for example.

00:38.220 --> 00:39.900
There's nothing sophisticated about it.

00:39.910 --> 00:41.700
It's just rows and values.

00:41.790 --> 00:46.800
OK, so normally microphone is used for graphing time stamped data, but I'll show you how to do something

00:46.800 --> 00:47.220
like this.

00:47.250 --> 00:53.520
OK, so to demonstrate this, log on to your Moscow and we'll create a simple database called Example

00:53.520 --> 00:53.970
Database.

00:53.970 --> 00:55.340
So copy that line.

00:55.350 --> 00:56.590
Don't copy the great event sign.

00:56.610 --> 01:02.340
Obviously, no signs to indicate that these are SQL statements throughout my documentation, so I'm

01:02.340 --> 01:04.280
already logged into my my there.

01:04.320 --> 01:06.690
Right click Create Database Example DB.

01:06.720 --> 01:11.380
OK, so now show databases and I have a new database called Example DB.

01:11.760 --> 01:13.340
Now we can add a table to that.

01:13.350 --> 01:15.300
First, let's create that table.

01:15.300 --> 01:17.910
So I just copy that section there, not the arrow.

01:17.940 --> 01:20.700
This is a great table command in Haskell.

01:20.700 --> 01:21.610
Your credit type of code.

01:21.640 --> 01:26.360
Simple table on example DB with an ID username and total columns.

01:26.370 --> 01:32.850
Until now, let's just fill it with some data so that we have something to query to insert into example

01:32.850 --> 01:33.300
DB.

01:33.330 --> 01:36.880
Simple table use name total columns just these values.

01:36.900 --> 01:39.320
It's all hypothetical data has just been made up.

01:39.330 --> 01:43.530
Any resemblance to anything real is purely accidental and coincidental.

01:43.560 --> 01:49.210
I just made it up because we need some data to query, Hey, we can check that data exists, select

01:49.350 --> 01:50.990
or from simple table there.

01:51.000 --> 01:51.500
And then we go.

01:51.540 --> 01:52.880
That table exists.

01:52.890 --> 01:56.610
Neither doesn't have timestamps, so we can't visualize that in Gravano sort of way.

01:56.690 --> 02:02.060
Now, Amber, when we created the my to collect a, we had to give our user co-founder a microphone,

02:02.070 --> 02:04.370
a service IP address, select permissions.

02:04.380 --> 02:09.570
Well, that user won't have select permissions on Example DB Simple Table.

02:09.570 --> 02:11.010
So let's add that now.

02:11.010 --> 02:17.280
So we'll grant select on this particular table to my user, and I just have to update the IP address

02:17.580 --> 02:22.910
to being that of microphone a server, which is that now press enter.

02:22.980 --> 02:27.840
That is because it's microphone, a server that will be making the connection to the secure database.

02:27.840 --> 02:30.630
Using a user call Carafano from that IP address.

02:30.640 --> 02:37.410
So that way, the host that my is allowing flush privileges, lost privileges and we can quit.

02:37.710 --> 02:38.160
Excellent.

02:38.250 --> 02:43.460
Now let's go and take a photo and go to the Explore tab Explore Select module, which is already is

02:43.470 --> 02:51.480
going to edit SQL and replace the template that has given us with this so missing control i.e. to select

02:51.480 --> 02:53.190
all and control V to paste.

02:53.700 --> 02:54.540
Click out of that.

02:54.980 --> 03:01.350
So if we do table, we could see the actual table data now in your file there, the values down the

03:01.360 --> 03:01.980
right there.

03:02.370 --> 03:07.680
We can't see that as time series because there is no time clock, so we need to invent a time column.

03:07.680 --> 03:12.040
And to do that, we can add an extra line code now as time second.

03:12.060 --> 03:15.180
So up here, select now as time second.

03:15.180 --> 03:20.700
Now is an actual function that tells you what the current date is and what returning it as the column

03:20.700 --> 03:21.440
time sick.

03:21.450 --> 03:24.690
So for now, run that query as a table.

03:24.690 --> 03:27.030
Again, we're seeing a time column now.

03:27.030 --> 03:32.510
Now that time column is just now, so it's always going to be the most recent time, which is now.

03:32.520 --> 03:37.590
So if I run that again, every time you run it, the seconds and milliseconds on the Saints will be

03:37.590 --> 03:38.040
updated.

03:38.130 --> 03:39.120
OK, so that's a trick.

03:39.120 --> 03:43.350
But the problem with that is you can't really graph it as a default graph.

03:43.350 --> 03:44.400
In Safana.

03:44.400 --> 03:49.770
We can see that series names down there, but Definer isn't really able to show us what's happening

03:49.770 --> 03:50.880
exactly right now.

03:50.880 --> 03:57.320
So on this graph, anyway, so just copy this section and we'll go into our last dashboard the way credit

03:57.330 --> 03:58.220
in the last video.

03:58.230 --> 04:03.120
The dashboard time that was new Dashboard Copy three, that is the custom query.

04:03.120 --> 04:06.380
There are credit in the last video do that for twenty four hours.

04:06.390 --> 04:07.630
It looks a little more interesting.

04:07.670 --> 04:09.480
They add panel, add an empty panel.

04:09.480 --> 04:13.470
Moscow Edit Squirrel Control Light is like dual control V2 placed.

04:13.470 --> 04:14.190
Click out of that.

04:14.200 --> 04:15.720
Now we have time series.

04:15.720 --> 04:16.530
Split it up there.

04:16.560 --> 04:24.540
Change that to gauge and that is a graph of the values in my simple table there in the database looking

04:24.540 --> 04:25.800
at the documentation.

04:25.830 --> 04:26.220
There it is.

04:26.220 --> 04:30.960
That's the data that I've put into the database using this insert command.

04:31.380 --> 04:37.530
Now not only can we use the page, we can also use the stat, the gauge and also the pie chart.

04:38.940 --> 04:42.240
So there are many options there on how you want to display that.

04:42.270 --> 04:48.480
I'm going to use the bar gauge and select horizontal, for example, retro LCD that looks pretty good

04:48.480 --> 04:49.470
or vertical.

04:49.500 --> 04:52.770
I can also use thresholds, so a lot of few thresholds.

04:54.110 --> 05:02.180
And change their orders, so, for example, that that can be 20, that can be 30, that can be 40 and

05:02.180 --> 05:04.250
that can be 50, for example.

05:04.250 --> 05:09.890
Apply that and then we go, that's a bar graph of my simple table in the database.

05:09.920 --> 05:15.710
Now if I said that to refresh it five seconds, so it's asking the database every five seconds now for

05:15.710 --> 05:21.710
the latest data, I can log in to my MySchool again and I can update one of these values using a new

05:21.720 --> 05:23.300
skill statement toward the bottom there.

05:23.300 --> 05:26.340
Update example DBE simple table set.

05:26.360 --> 05:29.840
Total equals 50 where username equals koala will end to that.

05:30.080 --> 05:33.110
Your statement is right clicking so it's going to set total equals 50.

05:33.110 --> 05:36.900
Where username is koala, that's the koala column that's currently 26.

05:36.940 --> 05:39.020
And so in a moment that'll be 50.

05:39.270 --> 05:41.660
OK, I guess that's updating every five seconds.

05:41.660 --> 05:45.800
We can change that again to being something like 150.

05:46.780 --> 05:47.200
There we go.

05:47.620 --> 05:52.240
Put it down to something else, like 50 and change different one.

05:53.650 --> 06:02.380
And let's try changing Amir to being 50 as well, the same, you know, to the five second update,

06:02.380 --> 06:03.130
it's updated.

06:03.130 --> 06:07.690
So you might have tables like that and you might want to grab some and they might not be time stamped,

06:07.690 --> 06:09.970
but you can still show them in profile if you need to.

06:10.100 --> 06:14.500
Anyway, that's non time series data and you have lots of options on the presentation.

06:14.770 --> 06:15.130
Excellent.
