JDBC Connection#
Example#
environment:
- mysql_db_driver=$System.getenv('MYSQL_DRIVER', 'com.mysql.cj.jdbc.Driver')
- mysql_db_url=$System.getenv('MYSQL_URL')
- mysql_db_username=$System.getenv('MYSQL_USERNAME')
- mysql_db_password=$System.getenv('MYSQL_PASSWORD')
connections:
mysql-db:
kind: jdbc
driver: "$mysql_db_driver"
url: "$mysql_db_url"
username: "$mysql_db_username"
password: "$mysql_db_password"
Fields#
kind(mandatory) (string):jdbcdriver(mandatory) (string) The Java class of the driver. Common drivers are:MySQL:
com.mysql.cj.jdbc.DriverMariaDB:
org.mariadb.jdbc.DriverSQL Server:
com.microsoft.sqlserver.jdbc.SQLServerDriverTrino:
io.trino.jdbc.TrinoDriverPostgreSQL:
org.postgresql.DriverOracle:
oracle.jdbc.OracleDriver
url(mandatory) (string) The URL of the database. Typical something likejdbc:postgresql://my-postgres-database.domain.com/my_databaseusername(optional) (string) The username to log inpassword(optional) (string) The password to log inproperties(optional) (map) Additional, database-specific properties. These are passed to the JDBC driver.
Description#
The jdbc connection is used to store all connection and credential information along with properties used for
connecting to a JDBC database. This connection then can be used in the jdbcTable,
jdbcView and jdbcQuery relation types.
JDBC Drivers#
You also need to provide an appropriate JDBC driver. These are commonly available as Flowman plugins, for example