SQLite loader for mkpipe.
Project description
mkpipe-loader-sqlite
SQLite loader plugin for MkPipe. Writes Spark DataFrames into SQLite database files 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:
sqlite_target:
variant: sqlite
database: /full/path/to/mydb.db
Table Configuration
pipelines:
- name: pg_to_sqlite
source: pg_source
destination: sqlite_target
tables:
- name: public.users
target_name: stg_users
replication_method: full
batchsize: 5000
Write Strategy
Control how data is written to SQLite:
- name: public.users
target_name: stg_users
write_strategy: upsert # append | replace | upsert | merge
write_key: [id] # required for upsert/merge
| Strategy | SQLite Behavior |
|---|---|
append |
Plain INSERT via JDBC (default for incremental) |
replace |
Drop and recreate table, then insert (default for full) |
upsert |
INSERT ... ON CONFLICT (write_key) DO UPDATE via temp table |
merge |
Same as upsert for SQLite |
Write Throughput
- name: public.users
target_name: stg_users
replication_method: full
batchsize: 5000
Performance Notes
- SQLite uses file-level locking —
write_partitionshas no benefit here as concurrent writes will serialize or fail. Setwrite_partitions: 1to avoid contention. - Keep
batchsizemoderate (1,000–10,000) — large transactions in SQLite can cause memory pressure. - SQLite is best suited for small-to-medium outputs (local development, testing, lightweight pipelines).
All Table Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
string | required | Source table name |
target_name |
string | required | SQLite destination table name |
replication_method |
full / incremental |
full |
Replication strategy |
batchsize |
int | 10000 |
Rows per JDBC batch insert |
write_partitions |
int | — | Set to 1 to avoid SQLite lock contention |
write_strategy |
string | — | append, replace, upsert, merge |
write_key |
list | — | Key columns for upsert/merge (required) |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkpipe_loader_sqlite-0.5.0.tar.gz.
File metadata
- Download URL: mkpipe_loader_sqlite-0.5.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa0a0b914aaa5e56ef88e84be19545acc8ca45d098aed2fecb91620fa582124
|
|
| MD5 |
7330054f2a2cb2fbf0361d682257554a
|
|
| BLAKE2b-256 |
57a557a56d7133d055bf3a2869306fe7b460621ac9ee3ffaf6c41cdf71e52b4d
|
File details
Details for the file mkpipe_loader_sqlite-0.5.0-py3-none-any.whl.
File metadata
- Download URL: mkpipe_loader_sqlite-0.5.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc1709a55d711a2c3c1720fe6ac5a5b321c6d684c70881007cfdc91aec146df
|
|
| MD5 |
e0b11c7f4ea0e4dcf4bc37e7ee47a487
|
|
| BLAKE2b-256 |
8b13728b88a7b9b352fe84c4a1a167c8f46c8ab7a06b9da7ff71758637bffa15
|