Connect Relational Databases
Connect Zingg to MySQL, PostgreSQL, SQL Server, DB2, MariaDB, and Oracle via JDBC.
Zingg connects to relational databases using the JDBC connector. This covers any JDBC-compatible database including MySQL, PostgreSQL, SQL Server, DB2, MariaDB, and Oracle. Available in all editions.
Download the JDBC driver for your database and add to zingg.conf.
spark.jars=<location of jdbc driver jar>Python API
from zingg.client import*
from zingg.pipes import*
jdbcPipe =
Pipe("pgInput", "jdbc")
jdbcPipe.addProperty("url", "jdbc:postgresql://localhost:5432/dbname")
jdbcPipe.addProperty("dbtable", "your_table")
jdbcPipe.addProperty("driver", "org.postgresql.Driver")
jdbcPipe.addProperty("user", "postgres")
jdbcPipe.addProperty("password", "your_password")
args.setData(jdbcPipe)JSON Config
{
"data" : [ {
"name" : "test",
"format" : "jdbc",
"props" : {
"url" : "jdbc:postgresql://localhost:5432/<db_name>",
"dbtable" : "<testData>",
"driver" : "org.postgresql.Driver",
"user" : "<postgres>",
"password" : "<postgres>"
}
} ]
}Last updated
Was this helpful?