Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ It copies tables (with indexes, constraints, sequences and partitions) **directl
| Custom and modern types | PostgreSQL enums and domains, DuckDB unions and fixed arrays, ClickHouse variants, maps and tuples |
| Embeddings move with their search | Vectors of pgvector, MySQL, MariaDB, Oracle, SQL Server, Db2, DuckDB and ClickHouse keep their dimensions, and vector indexes (HNSW, IVF) keep their distances and options |
| Embeddings live in a vector database | **Vector databases** sit in the connection tree like the other data sources: Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch and Chroma, read by their REST APIs. Expand one to its databases, collections, partitions, tenants or namespaces, open a collection to browse its fields and records page by page, then **Import…** writes it straight into a database with vectors: ids and vectors become columns, every top-level field becomes a column of its type and the whole payload is kept as JSON. Conditions, native filters and nearest neighbor searches choose the rows |
| The rows of Elasticsearch or OpenSearch indexes belong in a table | **SQL Query** on an Elasticsearch or OpenSearch data source, or on one of its indexes, runs SQL on the indexes (the SQL of these servers reads only). The rows of a query are exported like the rows of a table into SQL, Parquet, CSV or Excel packages or any database, an index becomes a plain table. Vectors with their vector indexes take the other way, **Import Vectors into Database** |
| The database sits behind a bastion host | **SSH tunnel** per data source, with a password or a private key (ed25519, RSA, ECDSA, with a passphrase). Host keys are trusted on first use and remembered, a changed host key is refused. A broken tunnel opens again by itself |
| Which server is this, and is it well? | **Info** opens the overview (product, version, driver, session, features SqlJam detected) and the health of a data source or a vector database (uptime, connections, size, cluster state, load), refreshed when you ask. Its **Dashboard** draws live charts of the last 5 minutes, sampled every 1 to 30 seconds: sessions, transactions, statements, rows, cache hits, locks, network, CPU, memory and size, read from the statistics of each database. Embedded databases show the CPU and the memory of SqlJam, in which they run. 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 |
| Long values and rows for a chat or a ticket | Cells show one line, a **double click** or **Shift+Enter** opens the whole value with JSON indented and vectors described. Select rows and **Copy Rows As** CSV, TSV, JSON or Markdown, or press **Ctrl+C** to paste them into a spreadsheet |
Expand Down Expand Up @@ -127,8 +128,8 @@ Only **Java 17+** is needed to run SqlJam. JavaFX and all JDBC drivers are insid
| Qdrant | 1.19 | 1.10 | scroll, named, sparse and multivectors |
| Weaviate | 1.39 | 1.24 | objects cursor and GraphQL, named vectors and tenants |
| Pinecone and Pinecone Local | API 2025-01 | API 2025-01 | list and fetch, namespaces, dense and sparse values |
| Elasticsearch | 8.19 | 8.0 | point in time, `dense_vector` |
| OpenSearch | 2.19 | 2.4 | point in time, `knn_vector` |
| Elasticsearch | 8.19 | 8.0 | point in time, `dense_vector`, SQL of indexes |
| OpenSearch | 2.19 | 2.4 | point in time, `knn_vector`, SQL of indexes |
| Chroma | 1.5 | 1.0 | REST API v2, tenants and databases |

Collections of vector databases go into the databases above which have vectors, never the other way round. Vector types and indexes are detected on the target before they are used, by a probe of each feature, so an older server, a missing extension or a setting which is turned off keeps the vectors as text.
Expand Down Expand Up @@ -171,8 +172,8 @@ SqlJam starts with a splash screen while it loads the configuration, the data so
2. Right-click a database or schema → **Export…**
3. Pick tables, choose **SQL scripts**, **Parquet**, **CSV** or **Excel** (folder) or **Database** (another data source, or a new one from the **+** button next to it), press **Start**. An import into a database runs in one transaction or commits every N rows (N is typed next to it), check **Skip rows with errors** to go on after bad rows and **Confirm before commit** to review it first, and choose **Update or insert by key** or **Skip existing by key** for rows which exist already.
4. Open a table, narrow its rows on the **Data** tab with columns, WHERE, GROUP BY and ORDER BY, then **Export…** just those rows. A header sorts the rows of the page, a double click shows a whole value and **Copy Rows As** copies the selected rows. **Info** on the toolbar or a right-click shows the overview and the health of the data source.
5. **SQL Query** on the toolbar or a right-click opens an editor for the data source. **Ctrl+Enter** (**⌘+Enter** on macOS) runs the statement at the caret, **Ctrl+Shift+Enter** runs them all, then **Export…** sends all rows of the query through the same exits.
6. Create a data source of the **Vector databases** category for Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch or Chroma, with an API key, a user and password or neither, as the database asks. Expand it in the tree to its databases, collections and partitions (tenants of Weaviate, namespaces of Pinecone), open a collection to see its fields and its records page by page, narrowed by conditions, a native filter or a nearest neighbor search. **Import…** on the collection tab, a right-click or **File → Import from Vector Database…** opens the wizard which imports the checked collections into a data source with vectors. Only such data sources are offered as targets.
5. **SQL Query** on the toolbar or a right-click opens an editor for the data source. **Ctrl+Enter** (**⌘+Enter** on macOS) runs the statement at the caret, **Ctrl+Shift+Enter** runs them all, **Ctrl+Space** or a dot after a table or alias completes the names of tables and columns, then **Export…** sends all rows of the query through the same exits. **Help → Keyboard Shortcuts** lists every key.
6. Create a data source of the **Vector databases** category for Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch or Chroma, with an API key, a user and password or neither, as the database asks. Expand it in the tree to its databases, collections and partitions (tenants of Weaviate, namespaces of Pinecone), open a collection to see its fields and its records page by page, narrowed by conditions, a native filter or a nearest neighbor search. **Import…** on the collection tab, a right-click or **File → Import from Vector Database…** opens the wizard which imports the checked collections into a data source with vectors. Only such data sources are offered as targets. **SQL Query** on an Elasticsearch or OpenSearch data source or index opens an editor for SQL on the indexes, **Export…** reads all rows of the query and exports them like a table, the wizard tells that vectors go through **Import Vectors into Database**.
7. Right-click a connected data source → **Disconnect** when you are done, its table tabs close with it. **Exit** sits at the right end of the toolbar. **Help → About SqlJam** shows the version, the home page, the repository and the author, and the GitHub icon at the bottom right opens the repository.

Three tutorial videos of about 2 minutes each walk through SqlJam:
Expand Down Expand Up @@ -559,6 +560,7 @@ Environment: Apple M2 Max, 32 GB, JDK 17. The databases run in Docker on a serve
| Can I copy a table inside the same database? | Yes. Choose the same data source and schema as the target and a table name such as `{table}_copy` |
| How are LOBs stored in Parquet? | Inside the Parquet columns (strings and binaries), no extra LOB files |
| How exact is CSV? | Exact. NULL is an empty field, an empty string is `""`, binaries are escaped, and every column is read back with its type from `manifest.json` |
| Can I write SQL against Elasticsearch or OpenSearch? | Yes, to read. **SQL Query** on the data source or an index runs their SQL (`SELECT`, `SHOW`, `DESCRIBE`), the first rows are shown and **Export…** sends all rows to a package or a database as a table. Objects and arrays become JSON text. Vectors keep their type only through **Import Vectors into Database** |
| How exact is Excel? | Exact as well. A cell holds 15 digits and milliseconds, so longer numbers and timestamps with microseconds are written as text, and every column is read back with its type from `manifest.json` |
| Can I import an Excel file without `manifest.json`? | Yes. **Import Parquet, CSV or Excel Files**, add the `.xlsx` file and choose a sheet. Its first row names the columns, number, date and boolean cells keep their types, formulas give their computed values. Older workbooks (`.xls`) are saved as `.xlsx` first |
| How are rows matched when they are updated or skipped? | By the primary key, or by the columns chosen in **Key Columns**. Choose the columns of a unique index of the target table: MySQL and MariaDB match rows by their unique indexes, PostgreSQL, SQLite and DuckDB require such an index. A table without primary key and chosen columns is inserted |
Expand Down
5 changes: 3 additions & 2 deletions docs/blogger/sqljam-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ SqlJam reads **one metadata tree** and generates SQL with a **dialect chosen by
| Custom and modern types | PostgreSQL enums and domains, unions, maps, tuples and variants |
| Embeddings move with their search | Vectors of pgvector, MySQL, MariaDB, Oracle, SQL Server, Db2, DuckDB and ClickHouse keep their dimensions, vector indexes keep their distances and options |
| Embeddings live in a vector database | Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch and Chroma sit in the tree as **vector databases**: browse their databases, collections, partitions, tenants and namespaces, page through the records, then import collections straight into a database with vectors: ids, vectors, a column of each field and the whole payload as JSON |
| Rows of an Elasticsearch index for a table | **SQL Query** on Elasticsearch or OpenSearch runs SQL on the indexes, the rows of a query are exported like a table into packages or any database. Vectors with their indexes take **Import Vectors into Database** |
| Database behind a bastion host | **SSH tunnel** per data source with a password or a private key, host keys trusted on first use, a broken tunnel opens again by itself |
| Which server, how healthy? | **Info** shows the overview and the health of a data source or a vector database, and a **Dashboard** of live charts: sessions, transactions, rows, cache, locks, network, CPU and memory, collections and records of vector databases |
| Long values, rows for a ticket | One line per cell, a double click shows the whole value, **Copy Rows As** CSV, TSV, JSON or Markdown |
Expand Down Expand Up @@ -78,13 +79,13 @@ SqlJam opens its main window like DBeaver and DataGrip, where it was closed, wit

Right-click a data source to **Connect**, and once it is connected the same menu offers **Disconnect**, which also closes its table tabs. When an import or export needs a target data source, the **+** button next to it creates one on the spot. **Exit** sits at the right end of the toolbar. **Help → About SqlJam** shows the version, the home page, the repository and how to reach the author, and the GitHub icon at the bottom right opens the repository.

**SQL Query** on the toolbar opens an editor for the selected data source. **Ctrl+Enter** (**⌘+Enter** on macOS) runs the statement at the caret, **Ctrl+Shift+Enter** runs them all, and **Export…** sends all rows of the query to SQL, Parquet, CSV, Excel or another database:
**SQL Query** on the toolbar opens an editor for the selected data source. **Ctrl+Enter** (**⌘+Enter** on macOS) runs the statement at the caret, **Ctrl+Shift+Enter** runs them all, **Ctrl+Space** or a dot completes the names of tables and columns (**Help → Keyboard Shortcuts** lists every key), and **Export…** sends all rows of the query to SQL, Parquet, CSV, Excel or another database:

![SQL Query](https://raw.githubusercontent.com/paganini2008/sqljam/master/docs/assets/sql-editor.png)

A new data source starts with its category: relational, OLAP or vector databases, and the types and fields follow it. **Connect through SSH tunnel** reaches a database behind a bastion host with a password or a private key.

A vector database is a data source of the **Vector databases** category, with an API key, a user and password or neither. Expand it in the tree to its databases, collections and partitions (tenants of Weaviate, namespaces of Pinecone) and open a collection: its fields, and its records page by page, narrowed by conditions, a native filter or a nearest neighbor search. **Import…** opens the wizard which writes the checked collections into a data source with vectors. Only such data sources are offered as targets.
A vector database is a data source of the **Vector databases** category, with an API key, a user and password or neither. Expand it in the tree to its databases, collections and partitions (tenants of Weaviate, namespaces of Pinecone) and open a collection: its fields, and its records page by page, narrowed by conditions, a native filter or a nearest neighbor search. **Import…** opens the wizard which writes the checked collections into a data source with vectors. Only such data sources are offered as targets. **SQL Query** on an Elasticsearch or OpenSearch data source or index opens an editor for their read only SQL, and **Export…** sends all rows of a query to a package or a database as a plain table.

Every data table shows one line per cell. A double click or **Shift+Enter** opens the whole value with JSON indented and vectors described, a header sorts the rows of the page, and **Copy Rows As** copies the selected rows as CSV, TSV, JSON or Markdown. **Info** on the toolbar shows the server, the driver, the session and the health of the selected data source.

Expand Down
5 changes: 3 additions & 2 deletions docs/blogger/sqljam-medium.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SqlJam reads one metadata tree and generates SQL with a dialect chosen by target
- **Custom and modern types** → PostgreSQL enums and domains, unions, maps, tuples and variants
- **Embeddings move with their search** → vectors of pgvector, MySQL, MariaDB, Oracle, SQL Server, Db2, DuckDB and ClickHouse keep their dimensions, vector indexes keep their distances and options
- **Embeddings live in a vector database** → Milvus, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch and Chroma sit in the tree as vector databases. Browse their databases, collections, partitions, tenants and namespaces, page through the records, then import collections straight into a database with vectors: ids, vectors, a column of each field and the whole payload as JSON
- **Rows of an Elasticsearch index for a table** → SQL Query on Elasticsearch or OpenSearch runs SQL on the indexes, the rows of a query are exported like a table into packages or any database. Vectors with their indexes take Import Vectors into Database
- **Database behind a bastion host** → an SSH tunnel per data source with a password or a private key, host keys trusted on first use, a broken tunnel opens again by itself
- **Which server, how healthy?** → Info shows the overview and the health of a data source or a vector database, and a Dashboard of live charts: sessions, transactions, rows, cache, locks, network, CPU and memory, collections and records of vector databases
- **Long values, rows for a ticket** → one line per cell, a double click shows the whole value, Copy Rows As CSV, TSV, JSON or Markdown
Expand Down Expand Up @@ -76,7 +77,7 @@ Step 4. narrow the rows of a table on the Data tab and export just those rows. R

![Data query](https://raw.githubusercontent.com/paganini2008/sqljam/master/docs/assets/table-data.png)

Step 5. open SQL Query on the toolbar, run a query with Ctrl+Enter (⌘+Enter on macOS) and press Export… to send all its rows to SQL, Parquet, CSV, Excel or another database:
Step 5. open SQL Query on the toolbar, run a query with Ctrl+Enter (⌘+Enter on macOS), complete names of tables and columns with Ctrl+Space, and press Export… to send all its rows to SQL, Parquet, CSV, Excel or another database:

![SQL Query](https://raw.githubusercontent.com/paganini2008/sqljam/master/docs/assets/sql-editor.png)

Expand All @@ -88,7 +89,7 @@ Step 7. load Parquet files of other tools into a table:

![Parquet files](https://raw.githubusercontent.com/paganini2008/sqljam/master/docs/assets/import-parquet.png)

Step 8. Create a data source of the Vector databases category, with an API key, a user and password or neither. Expand it in the tree to its databases, collections and partitions, open a collection to page through its records, narrowed by conditions, a native filter or a nearest neighbor search, and Import… writes the checked collections into a data source with vectors. Only such data sources are offered as targets.
Step 8. Create a data source of the Vector databases category, with an API key, a user and password or neither. Expand it in the tree to its databases, collections and partitions, open a collection to page through its records, narrowed by conditions, a native filter or a nearest neighbor search, and Import… writes the checked collections into a data source with vectors. Only such data sources are offered as targets. SQL Query on an Elasticsearch or OpenSearch data source or index opens an editor for their read only SQL, and Export… sends all rows of a query to a package or a database as a plain table.

![Vector database collection](https://raw.githubusercontent.com/paganini2008/sqljam/master/docs/assets/vdb-collection.png)

Expand Down
Loading
Loading