. . .

MySQL Module

Introduction

Being a concrete module of the JDBC meta module, the MySQL can be used to access relational SQL databases via the middleware.

This documentation will focus on the usage of this specific module. Please refer to the JDBC Module documentation for common matters.

Dashboard Example

In order to crawl a database, we need to add the MySQL module to our backend. This can be done using the Module Market in the Dashboard and should automaticly add the JDBC meta module.

Now we can start a new crawl by hovering over the added MySQL module and clicking Use. We now have to fill in the required options as follows:

Field name

Description

Example

Database URL

Connecting String containing the URL to the database server as well as the database name

jdbc:mysql://example.com:3306/app_db

User name

User name to be used for authentication

mysqladmin

Password

Password to be used for authentication

secret

Re-crawl

true - Overwrites previously crawled data if it existed

false - Throws an error if previously crawled data exists. This assures that you don't accidently overwrite data.

true

This might take up to a few minutes depending on the size of our database. As soon as it is finished, a notification will be displayed and we can add our freshly created module to our backend. In the case of this example its name would be MySQLAppDb.

After this point, the following steps are identical with any other JDBC module. You can continue by checking the crawled module as described in de JDBC meta module documentation.

REST Example

A new crawl can also be initiated using the REST interface.

Doing so, the Rest parameter names will differ from the field names stated above:

Field name

Rest parameter name

Database URL

url

User name

userName

Password

password

Re-crawl

reCrawl

The argument reCrawl only accepts Boolean values.

In addition to these parameters we need

Rest parameter name

Description

Example

customerName

Our customer name that we use to log in at ApiOmat

apinaut

appName

Name of the backend (formerly called app); please use the name provided in the configuration dialog box:

Your base URL is: http://<HOSTNAME>/yambas/rest/apps/%appName%

%appName% is the String we need

myfirstapp

We would finally call the REST endpoint using

cURL call
curl -X GET "http://[YOURHOST]/yambas/rest/modules/MySQL/myfirstapp/spec/crawler/?url=jdbc:mysql://example.com:3306/mysql_app&userName=mysqladmin&password=secret&reCrawl=false&customerName=apinaut&appName=myfirstapp" -u [CUSTOMEREMAIL]:[CUSTOMERPWD]

Limitations

This version doesn't support inserting or updating "year" values. Geometry column type support is limited.

* link only available in Enterprise Documentation