The JDBC connector extracts schema metadata from any JDBC-compatible relational database and loads it into the Neocarta semantic graph. It bridges Java and Python by shelling out to SchemaCrawler, a battle-tested Java schema-extraction library that supports 20+ databases. SchemaCrawler renders the catalog as compact JSON via a bundled FreeMarker template, which Neocarta then transforms into graph nodes and relationships. This connector is the right choice when your database doesn’t have a dedicated Neocarta connector. For BigQuery, useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/neo4j-labs/neocarta/llms.txt
Use this file to discover all available pages before exploring further.
BigQuerySchemaConnector instead — BigQuery JDBC drivers are not supported by SchemaCrawler.
Prerequisites
The JDBC connector requires external tooling that cannot be installed from Python. Before using it, ensure the following are available on the host running Neocarta:Java 11+
The connector runs
java -version at construction time and raises ConfigError if Java is missing or older than 11. Install a JRE or JDK (e.g. Temurin) and ensure java is on PATH.SchemaCrawler distribution
Download a SchemaCrawler 16.x release from schemacrawler.com/downloads.html and unzip it. Set
SCHEMACRAWLER_JAR to its _schemacrawler/lib/* directory. This is a multi-JAR distribution — use the lib/* wildcard, not a single fat JAR.FreeMarker JAR
Download
freemarker.jar from Maven Central and place it in the SchemaCrawler _schemacrawler/lib/ directory so it is picked up by the lib/* classpath wildcard.Supported Databases
PostgreSQL, MySQL/MariaDB, SQL Server, Oracle, SQLite, H2, and any other database whose JDBC driver implements theDatabaseMetaData schema/type/column methods SchemaCrawler requires at --info-level=detailed.
BigQuery is not supported via JDBC. Use the dedicated
BigQuerySchemaConnector for GCP projects.Import
Parameters
JDBC connection URL, e.g.
jdbc:postgresql://host:5432/mydb.Fully-qualified JDBC driver class, e.g.
org.postgresql.Driver.Filesystem path to the JDBC driver JAR.
Filesystem path to the SchemaCrawler distribution
_schemacrawler/lib/* classpath. Pass the wildcard literally — Java expands it.Connected Neo4j driver instance.
Target Neo4j database name.
Name for the graph
Database node and the root of all entity IDs. Defaults to the database name parsed from the JDBC URL path (e.g. mydb from jdbc:postgresql://host:5432/mydb). Required for Oracle SID or SQL Server databaseName= URLs where the name cannot be auto-derived.Database username. Optional when the JDBC driver supports passwordless auth.
Database password. Forwarded to SchemaCrawler via an environment variable (
--password:env=), never on the command line, so it does not appear in the process list.Hosting platform label for the
Database node (e.g. "AWS_RDS"). Not derivable from JDBC metadata; omitted from the node unless supplied.Database service/engine label for the
Database node. Defaults to the database product name SchemaCrawler reports (e.g. "POSTGRESQL").Maximum seconds to wait for the SchemaCrawler subprocess.
ingest() Parameters
Schema names to include. Names are combined into a regex alternation for SchemaCrawler’s
--schemas flag. Omit to extract all schemas.Code Example
CLI
Required Environment Variables
| Variable | Example | Purpose |
|---|---|---|
NEO4J_URI | bolt://localhost:7687 | Neo4j connection URI |
NEO4J_USERNAME | neo4j | Neo4j username |
NEO4J_PASSWORD | secret | Neo4j password |
NEO4J_DATABASE | neo4j | Target Neo4j database |
JDBC_URL | jdbc:postgresql://localhost:5432/mydb | JDBC connection URL |
JDBC_DRIVER | org.postgresql.Driver | Fully-qualified driver class |
JDBC_DRIVER_JAR | lib/postgresql-42.7.3.jar | Path to the JDBC driver JAR |
SCHEMACRAWLER_JAR | schemacrawler-16.x.x/_schemacrawler/lib/* | SchemaCrawler lib/* classpath |
JDBC_USER | postgres | Database username (optional) |
JDBC_PASSWORD | secret | Database password — environment only, never a CLI flag |
JDBC_SOURCE_DATABASE_NAME | mydb | Override for the Database node name (optional) |
Driver Setup by Database
- PostgreSQL
- MySQL
- Oracle
- SQL Server
Limitations
- Metadata only — no sampled column values (
Valuenodes) are produced. - No query logs — a future
jdbc/logs/sub-connector is planned but out of scope. - Primary/foreign keys —
is_primary_key/is_foreign_keyflags andREFERENCESedges are only written when the source database exposes them viaDatabaseMetaData. A key-less schema produces columns without those properties rather thanfalsevalues. - Java + JARs are host prerequisites — they are not Python dependencies and are not installed by
piporuv.