►
From YouTube: Read in Database Data with the Database Loader in ML.NET
Description
The new DatabaseLoader in ML.NET was updated in the 1.4-preview version. This video goes over how to use it.
Data - https://www.kaggle.com/camnugent/california-housing-prices
Code - https://github.com/jwood803/MLNetExamples/blob/master/MLNetExamples/DatabaseLoader/Program.cs
Contact:
Twitter: https://twitter.com/JWood/
Blog: https://jonwood.co/
Gear used (affiliate links):
Mic - https://amzn.to/2YEXtxI
Mouse - https://amzn.to/2ZtASoQ
A
Hey
everyone
so
again
with
the
release
of
the
1.4
preview
of
mo
dead.
We
were
also
given
an
update
to
the
database,
loader
and
so
I
figured
I'd
go
over
that
in
this
video,
so
I'm
in
Visual
Studio,
with
a
dynamic
or
console
project
loaded
and
already
have
a
config
file.
With
my
connection
string
to
the
database
I'll
be
using
here,
then
I
have
the
housing
data
and
the
housing
prediction.
Input
and
output
schema
classes.
A
So
we're
going
to
be
messing
with
the
housing
and
data
set
with
this
video
and
look
at
our
data
I'm
actually
going
to
look
at
your
data
studio
here
now.
I
have
my
data
pre-loaded
here,
so
we
run
it
real
quick
and
we
have
the
usual
features
of
the
housing
data
set
latitude,
longitude
total
rooms,
population,
and
we
have
the
median
house
value
that
will
be
pretty
doing
here
and
real
quick.
This
is
how
I
created
the
table.
A
I
used
an
identity
and
then
I
have
all
these
columns
in
here,
and
you
notice
all
the
types
on
the
numerical
values
or
real
will
get
to
a
point
where
I'll
explain
why
I
use
that
in
just
a
bit
go
back
to
visual
studio
and
we're
going
to
get
started.
First
thing,
like
always,
is
to
get
everything
from
nougat.
A
First
thing
is
I'm
gonna
get
and
load
that
net
and
I'm
going
to
use
one
point
for
free
V
and
the
database.
Loader
is
actually
in
the
experimental
NuGet
package,
that's
kind
of
where
everything
that
they're
currently
working
on
they
put
their
first
before
they
move
it
on
to
the
main,
a
monad
package.
This
is
the
point:
1
6
preview
version.
A
All
right
and
speaking
of
reading
in
the
config
file,
I'll
just
copy
this
code
over
where
we
build
a
connection
or
you
build
a
configuration
builder
and
we
just
read
from
the
config
file
and
then
get
the
connection
string
item
from
it
from
the
database
loader.
We
need
to
specify
the
columns
that
are
in
the
database
that
the
loader
will
be
using
to
read
from,
and
that's
going
to
be
need
a
new
database
loader
column.
A
A
A
A
In
the
connection
string-
and
it
says
command
text
and
what
that
is-
is
pretty
much
just
the
sequel
command.
There's
that
the
database
loader
is
going
to
execute
in
order
to
bring
down
our
data.
So
with
that
we'll
just
run
select
star
from
our
database
and
then
from
there.
We
can
just
do
loader
load
and
it
was
passing
that
database
source
they
were
just
created.
A
So
that's
pretty
much
gonna
load
in
our
data
and
to
kind
of
show
you
that
that
works
I'll
do
a
dating
that
preview
on
it
and
then
Oh
big
point
there
and
I'll
run
it
there.
You
go
that
ran
okay,
we
look
at
the
preview
rings.
Look
at
the
row
view
here.
You
know
dude.
Just
let's
see
your
row
eight
and
we
simply
get
our
data
here.
Just
as
we
expect.
Let
me
do
it
for
another
one
and
it
looks
the
same.
A
We
get
our
data
and
now
that
we
have
our
data,
we
can
continue
on
and
create
our
mo
net
that
REM
on
down
that
pipe
lines.
So
from
there
do
a
test,
train
split
context,
add
data
test,
train,
split
passenger
dado
with
a
test
track,
shade
of
20%
and
I'm
actually
going
to
use
some
link
to
get
all
of
our
features
we
do
is
we're
going
to
get
all
of
these
items
the
median
house
value,
because
that's
what
we're
going
to
be
predicting,
so
we
all
these
items
instead
of
typing
all
those
at
once.
A
A
As
well
as
when
it's
ocean,
proximity
and
I'll
send
that
to
and
right
because
since
we're
going
to
be
we're
doing
or
concatenate
later
on,
we
don't
need
to
include
the
label
column,
which
is
the
median
house
value
and
then
because
ocean
proximity
is
a
text
value.
We
don't
need
to
include
that
either
because
we're
gonna
do
something
a
little
bit
different
with
that.
Let's
not
require
our
pipeline
context,
transforms
text
and
feature
as
our
text.
A
A
A
A
We
go
got
prediction,
then
that
house
with
these
features
and
that's
predicted
about
two
hundred
and
sixty
thousand
dollars,
so
I'm
just
kind
of
stopped
there,
and
just
many
just
wanted
to
show
you
all
how
to
use
this
data
loader
to
load
data
directly
from
the
database,
and
this
is
this
is
especially
helpful.
So
you
don't
have
to
write
a
bunch
of
a
do
net
code
to
read
from
the
database
when
you
just
specify
a
few
things
and
let
anyone
done
that.