MySQL
Catalog databases, tables, views, columns, keys, stored procedures and functions, with SQL lineage from views, routines and query history.
Capabilities
| Capability | Support | Notes |
|---|---|---|
| Tables, views & columns | Supported | |
| Keys, constraints & indexes | Supported | |
| Procedures & functions | Supported | |
| Data lineage | Supported | |
| Lineage from query history | Supported | Statements collected from performance_schema. |
| Business glossary links | Supported | |
| Data quality probes | Supported | |
| Data profiling | Supported | |
| Data classification | Supported | |
| Chat with your data | Supported |
Connection settings
Create the connection on the Blindata Agent from Settings > Agents > Connections with the connection wizard, choosing MySQL in the technology step.
| Driver class | com.mysql.cj.jdbc.Driver |
|---|---|
| JDBC URL | jdbc:mysql://localhost:3306/mysql |
| Authentication |
Service principal (shared technical user) User principal (personal credentials, BYOC) Ephemeral credentials (asked at each run)
|
| Crawling strategy | SQL |
The driver is included in the Blindata Agent: no installation is needed. Driver properties can be added under Advanced settings in the connection wizard.
Prerequisites & permissions
- A Blindata Agent installed with network access to MySQL.
- A read-only user with
SELECToninformation_schema(granted by default for visible objects). SHOW VIEWto read view definitions andSHOW_ROUTINE(MySQL 8.0.20+) orSELECTonmysql.procto read routine bodies.SELECTonperformance_schemafor query history.SELECTon tables for data quality, profiling and Chat with your data.
Set up metadata crawling
- Create the connection to MySQL on the agent (see Connection settings) and use Test to verify it.
- Create or open the system that represents MySQL in the catalog and link it to the connection.
- In the CRAWLING tab add a crawling job with strategy SQL and, if needed, replace the default queries with the ones suggested below.
- Run a TEST to check the number of extracted objects, then RUN or schedule the job.
The job options and the column aliases of every extraction query are described in the Generic JDBC reference.
Suggested extraction queries
The default SQL strategy queries on information_schema work out of the box for tables, views, columns and constraints. Use the following routines query to also import routine parameters, needed for table-valued function lineage.
Routines query
information_schema.routines does not include parameters. They live in information_schema.parameters. select * from information_schema.routines is still valid for identity and body; for table-valued function argument lineage add ROUTINE_PARAMETERS (MySQL 8+):
SELECT
r.SPECIFIC_NAME,
r.ROUTINE_CATALOG,
r.ROUTINE_SCHEMA,
r.ROUTINE_NAME,
r.ROUTINE_TYPE,
r.ROUTINE_DEFINITION,
(
SELECT COALESCE(
JSON_ARRAYAGG(
JSON_OBJECT(
'name', p.PARAMETER_NAME,
'dataType', COALESCE(p.DTD_IDENTIFIER, p.DATA_TYPE),
'positionIndex', p.ORDINAL_POSITION - 1
)
ORDER BY p.ORDINAL_POSITION
),
CAST('[]' AS JSON)
)
FROM information_schema.PARAMETERS p
WHERE p.SPECIFIC_SCHEMA = r.ROUTINE_SCHEMA
AND p.SPECIFIC_NAME = r.SPECIFIC_NAME
AND UPPER(COALESCE(p.PARAMETER_MODE, 'IN')) IN ('IN', 'INOUT')
AND p.PARAMETER_NAME IS NOT NULL
AND p.PARAMETER_NAME <> ''
) AS ROUTINE_PARAMETERS
FROM information_schema.ROUTINES r
WHERE r.ROUTINE_SCHEMA NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');
Lineage from query history
The agent can periodically extract executed statements from MySQL and send them to Blindata, where the SQL lineage engine turns them into dataflows. See the ready-made extraction query in Scheduling and statements extraction.