JdbcOperator

JDBC

Executes sql code in a database using jdbc driver.

View Source

Last Updated: May. 7, 2021

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

sqlCan receive a str representing a sql statement, a list of str (sql statements), or reference to a template file. Template reference are recognized by str ending in '.sql'the sql code to be executed. (templated)
jdbc_conn_idstrreference to a predefined database
autocommitboolif True, each command is automatically committed. (default value: False)
parametersdict or iterable(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?