Move tables across databases. Schema, data and all.
A desktop import/export tool that copies tables, indexes, constraints, sequences, partitions and rows between relational and OLAP databases, directly, as copies in the same schema, or through a self-describing SQL, Parquet, CSV or Excel export package you can import later. Imports into a database run in one transaction which an error rolls back, and rows are inserted, updated or skipped by key.

INSERT statements are easy. Everything around them is not.
Types, identity columns, default values and literals differ in every database.
→ The target dialect translates them.
Oracle 11g has no identity, SQL Server 2008 no OFFSET, PostgreSQL 9 no partitions.
→ Version subclasses generate compatible SQL.
Data arrives, but primary keys, foreign keys, sequences and comments do not.
→ Table-level objects move together.
Gigabyte data.sql files and BLOB literals that break 4000-byte limits.
→ 10 MB parts and LOB files.
Shifted timestamps, overflowing unsigned numbers, garbled bits and money.
→ A portable value pipeline.
Collections of Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch or Chroma never meet the SQL of the business data.
→ Collections go straight into a database with vectors.
Production servers answer only through an SSH jump host.
→ An SSH tunnel per data source.
Every source/target combination, verified by tests.
Dialects picked by detected or selected server version, vector types and indexes by the features detected on the target.
Primary keys, indexes, foreign keys, comments and sequences.
Range, list, hash, interval, composite, reference and nested partitions kept for the same database type, partitioned tables marked in the tree.
SQL, Parquet, CSV or Excel files, LOB files and manifest.json, split by size and imported in order.
Checked by status, type and SHA-256, all or nothing or bad rows skipped and logged, confirmed before the commit if you want.
Overall percentage, per-table progress, error log and cancel.
Every import and export leaves a report, also when it fails or is cancelled: rows per table checked against the target, skipped rows, objects and where it stopped, kept in the import history.
Changed rows by an update time or an increasing key, every N minutes or every day, run by SqlJam or by your own scheduler through its command line, vector collections too, a report for every run.
A modern JavaFX UI with 7 switchable themes.
Columnar, text or spreadsheet packages and files of other tools, exact types, through an embedded DuckDB.
DuckDB and ClickHouse next to the relational databases.
A highlighted SQL Query editor or the data viewer shapes the rows, then every exit exports all of them.
Copy tables inside the same schema with names like {table}_copy.
pgvector, MySQL, MariaDB, Oracle, SQL Server, Db2, DuckDB and ClickHouse vectors keep their dimensions, HNSW and IVF indexes keep their distances.
Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch and Chroma in the tree: databases, collections, partitions and tenants, records page by page, imported into tables of ids, vectors, fields and the payload as JSON. SQL on Elasticsearch and OpenSearch exports the rows of indexes like tables.
Rename a column, give it a type of the target or leave it out, keys and indexes follow, other columns stay as they are.
Reach a database behind a bastion host with a password or a private key, host keys trusted on first use.
Server, driver, session and the health of a data source or a vector database, and live charts of sessions, transactions, rows, cache, locks, CPU and memory.
Double click a cell for its whole value, copy selected rows as CSV, TSV, JSON or Markdown, filter the data sources of the tree.
SqlJam builds a metadata tree of the source, renders it with the dialect of the target type and version, then streams rows to a database or an export package.
Metadata: per-database operations read tables, keys, indexes, comments, partitions and sequences.
Dialect: DbType.createDialect(major, minor) picks e.g. Oracle11gDialect.
Rows: counted, paged by primary key, normalized and written in batches, or written to Parquet, CSV or Excel by an embedded DuckDB.
Vector databases: a line of its own. REST clients read the collections, a visitor builds the tables and the pages go into a target whose vector features are probed first.
Java 17 is all you need on Windows, macOS and Linux. JavaFX and every JDBC driver are bundled.
git clone git@github.com:paganini2008/sqljam.git && cd sqljam
./mvnw -DskipTests package # Windows: mvnw.cmd, output goes to bin/
bin/sqljam.sh # Windows: bin\sqljam.bat, or double click the jar of your platform// MySQL database → PostgreSQL export package
ScriptExporter exporter = new ScriptExporter(new File("export"), false);
Exporter.ExportConfiguration config = exporter.getConfiguration();
config.setDbType(DbType.MYSQL);
config.setUrl(DbType.MYSQL.getUrl("localhost", 3306, "shop"));
config.setUsername("root");
config.setPassword("secret");
exporter.setTargetDbType(DbType.POSTGRESQL);
exporter.exportDdlAndData();export/
├── schema.sql
├── data.sql # data_2.sql … above 10 MB
├── lob/
│ └── document/000001_content.clob
├── lob-manifest.json
├── constraints.sql # foreign keys, after data
└── manifest.json # source, target, sha256, rows
Pick tables, choose the target type and version, one file per table or a single data.sql, and whether LOBs go into files.
exporter.setTargetDbType(DbType.ORACLE);
exporter.setTargetVersion(11, 2); // sequences + triggers
Copy straight into another data source, or create one on the spot with the + button next to it. Target schemas are created, identities continue from the imported max value.
target.setDbType(DbType.SQLSERVER);
target.setTargetSchemaName("hr"); // created if missing
importer.exportDdlAndData();
The manifest decides: only data sources of the exported target type are offered, files are checked by SHA-256 and run in order.
ScriptImporter importer = new ScriptImporter(connection, DbType.POSTGRESQL);
importer.importDirectory(new File("export"));
Write any SQL in the highlighted SQL Query editor, check the first rows, then export all rows of the query as a table. The data viewer narrows one table with columns, WHERE, GROUP BY and ORDER BY the same way.
source.getQueries().put("order_summary",
"SELECT c.name, SUM(o.amount) AS amount FROM orders o JOIN customers c ...");
source.getTableQueries().put("EMPLOYEES", new TableQuery(columns,
"SALARY > 1000", null, "SALARY DESC"));
Export packages of Parquet, CSV or Excel files, look inside them with sizes, times and previews, and load Parquet, CSV or Excel files of other tools into any table, an Excel sheet without manifest.json too.
parquet.setCompression("ZSTD");
parquet.exportDdlAndData(); // data/<table>.parquet
csv.setDelimiter(";");
csv.exportDdlAndData(); // data/<table>.csv, <table>_2.csv ...
excel.exportDdlAndData(); // data/<table>.xlsx, one sheet with a header row
importer.importFiles(files, "sales", ParquetImporter.Mode.CREATE);
Add a vector database as a data source, expand it in the tree to its databases, collections and partitions, page through the records of conditions, a native filter or a nearest neighbor search, and import the collections into a data source with vectors. Only such data sources are offered as targets. On Elasticsearch and OpenSearch, SQL Query reads the indexes and exports the rows of a query like a table.
configuration.addCollection("docs", "docs");
configuration.setQuery(VdbQuery.all().where("lang = 'en'"));
new VdbExporter(client, dataSource, configuration).export(); // id, embedding vector(1024), payload jsonb
Map Columns renames a column, gives it a type of the target or leaves it out, for tables and for the fields of vector collections. Keys, indexes and foreign keys follow the new names, the other columns are imported as they are.
orders.put("NOTE", new ColumnMapping("REMARK", "TEXT", false));
orders.put("SECRET", ColumnMapping.skip()); // not imported
target.getColumnMappings().put("ORDERS", orders);
Every import and export leaves a migration report, also when it fails or is cancelled: rows of each table counted again in the target, skipped rows with their errors, created objects and where it stopped. Transfer > Import History lists every report, View Report opens one, Export writes it as Markdown, HTML or JSON.
~/.sqljam/reports/20261025-134910-9fec1f3e.json
Completed · 3 tables · 263 rows written · 0 skipped
sjm_emp 250 → 250 ✓
Sync tasks copy the rows which changed since the last run, by a column of the update time or an increasing key, every N minutes or every day. SqlJam runs them while it is open. Copy Command gives the command line of a task for a cron or the Task Scheduler of your own, SqlJam never changes the scheduler of your system. Vector collections sync too, every run leaves a report.
sqljam.sh sync --list
sqljam.sh sync --task "Shop to PostgreSQL"
sqljam.sh sync --due # one line of cron for every task
Info > Dashboard draws live charts of the last 5 minutes: sessions, transactions, statements, rows, cache hits, locks, network, CPU and memory, read from the statistics of each database. Vector databases show their collections and records, Elasticsearch and OpenSearch also CPU, heap, indexing and searches, Qdrant requests and memory. Metrics which a server does not tell are listed with the reason.
Sample every 1, 2, 5, 10 or 30 s · Pause · Resume| Scenario (200,000 rows × 6 columns) | Time | Rows/s |
|---|---|---|
| H2 → MySQL | 9.9 s | 20.2k |
| H2 → MariaDB | 7.7 s | 26.0k |
| H2 → PostgreSQL | 6.9 s | 28.8k |
| H2 → Oracle | 4.8 s | 41.6k |
| H2 → SQL Server | 13.3 s | 15.1k |
| H2 → Db2 | 10.7 s | 18.7k |
| H2 → ClickHouse | 5.4 s | 36.8k |
| H2 → DuckDB | 5.4 s | 37.2k |
| H2 → SQL package | 2.5 s | 81.0k |
| H2 → Parquet package | 5.8 s | 34.6k |
| H2 → CSV package | 5.5 s | 36.7k |
| SQL package → PostgreSQL | 10.1 s | 19.8k |
| Qdrant → PostgreSQL (20,000 points, 256-d vectors and payload) | 18.3 s | 1.1k |
Environment: Apple M2 Max, 32 GB, JDK 17 · databases in Docker on a server of the local network, H2, DuckDB and the packages local · default settings.
Build, run and export your first tables.
Read →Export packages, direct imports and type translation.
Read →Every key of sqljam.properties and export options.
Read →Export, import, copy and query from Java with ScriptExporter, ImportExporter, CsvExporter, ExcelExporter, ManualTransaction and more.
Read →Metadata tree, dialects and version subclasses.
Read →How SqlJam works, with examples, configuration and performance.
Read →