JDBC Catalog

The catalog schema defines one datalake or other data source of PuppyGraph.

Fields

FieldTypeDescription

name

string

A user-provided name is used for referencing in vertex and edge specifications.

type

"mysql" | "postgresql"|"duckdb" | "bigquery" | "redshift"

The type of the catalog.

jdbc

JDBCSchema

Detailed specification of the JDBC connection.

JDBCSchema

FieldTypeDescription

username

string

password

string

jdbcUri

string

The URI that the JDBC driver uses to connect to the target database. For MySQL, the URI is in the "jdbc:mysql://ip:port" format. For PostgreSQL, the URI is in the "jdbc:postgresql://ip:port/db_name" format.

For DuckDB, the URI is in the "jdbc:duckdb:db_absolute_path" format.

For BigQuery, the URI is in the

"jdbc:bigquery://[Host]:[Port];ProjectId=[Project];OAuthType=[AuthValue];[Property1]=[Value1];[Property2]=[Value2];..."

format. Please refer to website to get more. For Redshift, the URI is in the "jdbc:redshift://[Host]:[Port]/[DB_name]" format.

driverClass

string

  • MySQL: com.mysql.jdbc.Driver (MySQL v5.x and earlier) and com.mysql.cj.jdbc.Driver (MySQL v6.x and later)

  • PostgreSQL: org.postgresql.Driver

  • DuckDB: org.duckdb.DuckDBDriver

  • BigQuery: com.simba.googlebigquery.jdbc.Driver or depend on your driver provided by driverUrl.

  • Redshift: com.amazon.redshift.Driver

driverUrl

string

  • MySQL: "https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar"

  • PostgreSQL: "https://repo1.maven.org/maven2/org/postgresql/postgresql/42.3.3/postgresql-42.3.3.jar"

  • DuckDB: "https://repo1.maven.org/maven2/org/duckdb/duckdb_jdbc/0.9.1/duckdb_jdbc-0.9.1.jar"

Examples

MySQL

{
  "name": "jdbc_mysql",
  "type": "mysql",
  "jdbc": {
    "username": "<username>",
    "password": "<password>",
    "jdbcUri": "jdbc:mysql://<host>",
    "driverClass": "com.mysql.cj.jdbc.Driver",
    "driverUrl": "https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar"
  }
}

PostgreSQL

{
  "name": "jdbc_postgres",
  "type": "postgresql",
  "jdbc": {
    "username": "<username>",
    "password": "<password>",
    "jdbcUri": "jdbc:postgresql://<host>/postgres",
    "driverClass": "org.postgresql.Driver",
    "driverUrl": "https://repo1.maven.org/maven2/org/postgresql/postgresql/42.3.3/postgresql-42.3.3.jar"
  }
}

DuckDB

{
  "name": "jdbc_duckdb",
  "type": "duckdb",
  "jdbc": {
    "jdbcUri": "jdbc:duckdb:/home/share/test.db",
    "driverClass": "org.duckdb.DuckDBDriver",
    "driverUrl": "https://repo1.maven.org/maven2/org/duckdb/duckdb_jdbc/0.9.1/duckdb_jdbc-0.9.1.jar"
  }
}

BigQuery

{
  "name": "jdbc_bigquery",
  "type": "bigquery",
  "jdbc": {
    "jdbcUri": "jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=pjid;OAuthType=0;OAuthServiceAcctEmail=sa@pjid.iam.gserviceaccount.com;OAuthPvtKeyPath=/temp/pjid.json;EnableSession=1;",
    "driverClass": "org.duckdb.DuckDBDriver"
  }
}

Redshift

{
  "name": "jdbc_redshift",
  "type": "redshift",
  "jdbc": {
    "username": "<username>",
    "password": "<password>",
    "jdbcUri": "jdbc:redshift://[host]:[port]/[db_name]",
    "driverClass": "com.amazon.redshift.Driver"
  }
}

Last updated