← All Adapters
MySQL logo

MYSQL

type: mysql
FREE FOR INDIVIDUALS✓ VERIFIED IN DVT TEST SUITE

The world's most popular open-source database. Widely used for operational/transactional workloads and web applications.

DVT SUPPORT

FEDERATION SOURCE

read in federation models

FEDERATION TARGET

materialize federation results

DEFAULT TARGET

run full dbt projects against it

SEED TARGET

dvt seed --target loads here

DVT supports MySQLbecause both dbt and Sling do: dbt drives standard materializations when it's your default target, Sling moves data in and out during federation. Connectivity for both layers is checked with dvt debug --all.

PREREQUISITES

Driver: mysqlclient — installed automatically by:

dvt sync

CONFIGURATION FIELDS

FIELDTYPEREQUIREDDEFAULTDESCRIPTION
typestringyesMust be `mysql`
hoststringyeslocalhostDatabase server hostname
portintegerno3306Database server port
userstringyesDatabase username
passwordstringyesDatabase password
databasestringyesDatabase name (MySQL schema = database)
schemastringnoDefaults to the database name
threadsintegerno4Number of parallel threads

PROFILES.YML EXAMPLE

my_project:
  target: mysql_dev
  outputs:
    mysql_dev:
      type: mysql
      host: localhost
      port: 3306
      user: analyst
      password: "{{ env_var('MYSQL_PASSWORD') }}"
      database: operations           # MySQL schema = database
      schema: operations

SOURCES.YML EXAMPLE

sources:
  - name: crm
    meta:
      connection: mysql_dev
    schema: crm_db
    tables:
      - name: customers
      - name: orders
      - name: products

DBT ADAPTER FEATURES

When MySQL is your default target, every standard dbt model runs through the official dbt adapter — all of its documented capabilities apply unchanged:

MATERIALIZATIONS

tableviewincrementalephemeralf_tablef_incremental

INCREMENTAL STRATEGIES

appenddelete+insert

NOTABLE CONFIGS

  • engine selection (InnoDB)
Official dbt MySQL adapter docs ↗

FEDERATION INCREMENTAL STRATEGIES

Strategies available when this engine is the target of a f_incremental model:

Append Delete+Insert Merge