Skip to main content

mkpipe-extractor-mysql

MySQL extractor plugin for MkPipe. Reads MySQL tables via JDBC.

Documentation

For more detailed documentation, please visit the GitHub repository.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.


Connection Configuration

connections:
  mysql_source:
    variant: mysql
    host: localhost
    port: 3306
    database: mydb
    user: myuser
    password: mypassword

Table Configuration

pipelines:
  - name: mysql_to_pg
    source: mysql_source
    destination: pg_target
    tables:
      - name: orders
        target_name: stg_orders
        replication_method: full
        fetchsize: 100000

Incremental Replication

      - name: orders
        target_name: stg_orders
        replication_method: incremental
        iterate_column: updated_at
        iterate_column_type: datetime
        partitions_column: id
        partitions_count: 4
        fetchsize: 50000

Custom SQL

      - name: orders
        target_name: stg_orders
        replication_method: incremental
        iterate_column: updated_at
        iterate_column_type: datetime
        custom_query: "SELECT id, user_id, total FROM orders WHERE {query_filter}"

Read Parallelism

Set partitions_column and partitions_count to read in parallel via multiple JDBC connections:

      - name: events
        target_name: stg_events
        replication_method: incremental
        iterate_column: created_at
        iterate_column_type: datetime
        partitions_column: id
        partitions_count: 8
        fetchsize: 50000

Performance Notes

  • partitions_column should be a numeric column (e.g. primary key).
  • MySQL JDBC streaming requires fetchsize: Integer.MIN_VALUE to avoid loading all rows into memory — mkpipe uses a positive fetchsize which works with standard cursors. For very large tables, keep fetchsize moderate (50,000–100,000).
  • Partitioning only applies to incremental replication.

All Table Parameters

Parameter Type Default Description
name string required MySQL table name
target_name string required Destination table name
replication_method full / incremental full Replication strategy
iterate_column string or list — Column(s) for incremental watermark. String for single column or SQL expression, list for multi-column OR logic
iterate_column_type int / datetime — Type of iterate_column
partitions_column string same as iterate_column Column to split JDBC reads on
partitions_count int 10 Number of parallel JDBC partitions
fetchsize int 100000 Rows per JDBC fetch
custom_query string — Override SQL with {query_filter} placeholder
custom_query_file string — Path to SQL file (relative to sql/ dir)
tags list [] Tags for selective pipeline execution
pass_on_error bool false Skip table on error instead of failing

Metadata

Release files for mkpipe-extractor-mysql 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkpipe-extractor-mysql 0.5.0
File Size Uploaded
mkpipe_extractor_mysql-0.5.0.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkpipe-extractor-mysql 0.5.0
File Interpreter ABI Platform
mkpipe_extractor_mysql-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / mkpipe_extractor_mysql-0.5.0.tar.gz

Download URL mkpipe_extractor_mysql-0.5.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
998752746b9b925b1b01d09633bff486072eeb606ea9027238456e779b42e838
BLAKE2b-256 checksum
How to use checksums
c32cc1765f09c54c7e4d54b13ea84abc122a4bfaf0f28170a6cdb2afa9697462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / mkpipe_extractor_mysql-0.5.0-py3-none-any.whl

Download URL mkpipe_extractor_mysql-0.5.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
675daf01da4d692eb6b16b8aebb93550b5a7d00a92e656668bce40e2f6917869
BLAKE2b-256 checksum
How to use checksums
c1d7528809ff625a5dd7fe3e0952c4f2e58b5ca891546b01360890fecee723fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.6

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page