# Connecting to MariaDB Database

MariaDB is a database management system used for storing data in a structured format and making it accessible for use through different tools and applications. Astera offers native connectivity for MariaDB databases at both source and destination points.

The connectivity also extends to other objects such as Database *Lookup, SQL Query Lookup, SQL script task in a workflow, and Database Write Strategies.*

To learn more about MariaDB and its installation, click [here](https://mariadb.org/).

In this article, we will cover:

1. Connecting to MariaDB in Astera.
2. Data reading options available for the MariaDB database
3. A use case to see how you can work with MariaDB databases in Astera

## **Use Case**

To configure a connection with MariaDB databases, we will be using the [*Database Table Source* ](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/sources/database-table-source)object.

1. To configure the *Database Table Source* object, right-click on its header and select *Properties* from the context menu.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FaEECAfp6Knlz0yfImK2z%2F0.png?alt=media)

As soon as you have selected the *Properties* option from the context menu, a new window will open.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FijS73gza2bSMjLSu9nvv%2F1.jpeg?alt=media)

This is where you will configure the connection with the database.

2. The first step is to specify the *Data Provider* for the source object. Select *MariaDB* as your data provider from the list.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FU3Zo2FuXKzw0VRVzX1uh%2F2.png?alt=media)

3. Put in the required credentials for your MariaDB data provider account.
   * *User ID*
   * *Password*
   * *Server Name*
   * *Database*
   * *Schema*
   * *Port*

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FFPdPUlz3uuLCI64fP4PF%2F3.png?alt=media)

4. *Test Connection* to check that your database connection is successful, and click *Next*.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FvYVfMpMQmHhtyVSfMW2a%2F4.png?alt=media)

Once the connection is established, you can *Pick Source Table* and modify *Reading Options* for the MariaDB Database on the *Properties* window.

To read more on different data reading options in a *Database Table Source*, click[ here](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/sources/database-table-source#configuring-the-database-table-source-object).

You have now successfully configured MariaDB as the database provider for your *Database Table Source* object. The fields from the source object can now be mapped to other objects in a dataflow.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FOkYzNBivagw1W5XUyXDe%2F5.png?alt=media)

Let’s use the data from the selected table from the *MariaDB Database* table in a dataflow.

In this example, we have sourced the *Customers* data from the database. We need to filter out data of customers with the contact title ‘Sales Representative.’

We will use the *Filter* transformation to filter out records of customers who are Sales Representatives.

To know more about how a *Filter Transformation* works in Astera, click [here](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/transformations/filter-transformation).

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FWPvEi28r4FYab1F0xUcc%2F6.png?alt=media)

If we preview the output, we have filtered records for *Customers* with the contact title as Sales Representatives.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FzRyhbxRi1saAcCclRKpD%2F7.png?alt=media)

Now, we can write this data to a destination in Astera.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FwqM95STcBlqCxecxpzsg%2F8.png?alt=media)

In this case, we have written the data to an *Excel Workbook Destination*.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2Ffi0DSr4S4E7Qtx56rSXL%2F9.png?alt=media)

We have successfully connected to the *MariaDB Database* and completed our use case in Astera.
