JdbcOperator

JDBC

Executes sql code in a database using jdbc driver.

View on GitHub

Last Updated: Oct. 23, 2022

Access Instructions

Install the JDBC provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

sqlthe SQL code to be executed as a single string, or a list of str (sql statements), or a reference to a template file. Template references are recognized by str ending in ‘.sql’
jdbc_conn_idreference to a predefined database
autocommitif True, each command is automatically committed. (default value: False)
parameters(optional) the parameters to render the SQL query with.

Documentation

Executes sql code in a database using jdbc driver.

Requires jaydebeapi.

See also

For more information on how to use this operator, take a look at the guide: JdbcOperator

Was this page helpful?