Skip to main content

MariaDB loader for mkpipe.

Project description

mkpipe-loader-mariadb

MariaDB loader plugin for MkPipe. Writes Spark DataFrames into MariaDB 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:
  mariadb_target:
    variant: mariadb
    host: localhost
    port: 3306
    database: mydb
    user: myuser
    password: mypassword

Table Configuration

pipelines:
  - name: pg_to_mariadb
    source: pg_source
    destination: mariadb_target
    tables:
      - name: public.orders
        target_name: stg_orders
        replication_method: full
        batchsize: 10000

Write Strategy

Control how data is written to MariaDB:

      - name: public.orders
        target_name: stg_orders
        write_strategy: upsert       # append | replace | upsert | merge
        write_key: [id]              # required for upsert/merge
Strategy MariaDB Behavior
append Plain INSERT via JDBC (default for incremental)
replace Drop and recreate table, then insert (default for full). Use if_exists: append to preserve existing table
upsert INSERT ... ON DUPLICATE KEY UPDATE via temp table
merge Same as upsert for MariaDB

Write Parallelism & Throughput

      - name: public.orders
        target_name: stg_orders
        replication_method: full
        batchsize: 10000
        write_partitions: 4
  • batchsize: rows per JDBC batch INSERT.
  • write_partitions: reduces concurrent JDBC connections via coalesce(N).

All Table Parameters

Parameter Type Default Description
name string required Source table name
target_name string required MariaDB destination table name
replication_method full / incremental full Replication strategy
batchsize int 10000 Rows per JDBC batch insert
write_partitions int Coalesce DataFrame to N partitions before writing
write_strategy string append, replace, upsert, merge
write_key list Key columns for upsert/merge (required)
if_exists string replace (drop+create) or append (preserve table). Inherits from settings
dedup_columns list Columns used for mkpipe_id hash deduplication
tags list [] Tags for selective pipeline execution
pass_on_error bool false Skip table on error instead of failing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkpipe_loader_mariadb-0.6.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkpipe_loader_mariadb-0.6.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file mkpipe_loader_mariadb-0.6.0.tar.gz.

File metadata

  • Download URL: mkpipe_loader_mariadb-0.6.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mkpipe_loader_mariadb-0.6.0.tar.gz
Algorithm Hash digest
SHA256 d22bdf60b6f7201ad57eca1bc3e2ffee0de8097628f6925b42d521b73900d447
MD5 434c9f329ca82b971da70e4373c3021d
BLAKE2b-256 2d665a009b85fcadfa13b4249d1423e5d5b9ef30dc4a85cdd3ece1949381d53d

See more details on using hashes here.

File details

Details for the file mkpipe_loader_mariadb-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkpipe_loader_mariadb-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9373d55d26873a7af601eed33814c99b58a71f7c6f3ac26543134789fd0eb07
MD5 3a3002cc95a79dccadc39b3018d36a9c
BLAKE2b-256 0a73eff3793810e02a4593f20d146769c9bd33bd4aab032c679fc1bfa86fbf7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page