MariaDB 1 is a popular open source fork of MySQL. It can be
connected to the getML engine using the function
connect_mariadb(). But first, make sure your
database is running, you have the corresponding hostname, port as well
as your user name and password ready, and you can reach it from via
your command line.
If you are unsure which port or socket your MariaDB is running on, you can start the mysql command line interface
and use the following queries to get the required insights.
MariaDB [(none)]> SELECT @@port; MariaDB [(none)]> SELECT @@socket;
Import from MariaDB¶
By selecting an existing table of your database in the
from_db() class method, you can create a
DataFrame containing all its data.
Alternatively you can use the
read_query() methods to replace the
content of the current
DataFrame instance or
append further rows based on either a table or a specific query.
Export to MariaDB¶
You can also write your results back into the MariaDB database. By
providing a name for the destination table in
getml.pipeline.Pipeline.transform(), the features generated
from your raw data will be written back. Passing it into
getml.pipeline.Pipeline.predict() generates predictions
of the target variables to new, unseen data and stores the result into
the corresponding table.