MySQL¶
This doc will help you understand how to add data sources to ThirdEye. Please run through the Quick Start guide and shut down the frontend server process.
Prerequisites¶
An accessible MySQL server containing data.
Data sources configuration¶
Add your MySQL database URL and credentials in thirdeye-pinot/config/datasources/data-sources-config.yml. You will be able to add multiple databases with multiple credentials, as follows:
dataSourceConfigs:
- className: org.apache.pinot.thirdeye.datasource.sql.SqlThirdEyeDataSource
properties:
MySQL:
- db:
<dbname1>: jdbc:mysql://<db url1>
<dbname2>: jdbc:mysql://<db url2>
user: <username>
password: <password>
- db:
<dbname3>: jdbc:mysql://<db url3>
<dbname4>: jdbc:mysql://<db url4>
user: <username2>
password: <password2>
Note: the dbname here is an arbitrary name that you want to name it. In dburl, you still need to include the specific database you are using.
Here’s an example below.
dataSourceConfigs:
- className: org.apache.pinot.thirdeye.datasource.sql.SqlThirdEyeDataSource
properties:
MySQL:
- db:
dataset_pageviews: jdbc:mysql://localhost/dataset
user: uthirdeye
password: pass
Import metric from MySQL¶
The next step is to import metrics from your dataset into the ThirdEye system. Please see Import metric from Presto/MySQL.
Start an analysis¶
Point your favorite browser to
http://localhost:1426/app/#/rootcause
and type any data set or metric name (fragment) in the search box. Auto-complete will now list the names of matching metrics. Select any metric to start an investigation.