Apache Drill Operators

Prerequisite

To use DrillOperator, you must configure a Drill Connection.

DrillOperator

Executes one or more SQL queries on an Apache Drill server. The sql parameter can be templated and be an external .sql file.

Using the operator

tests/system/providers/apache/drill/example_drill_dag.py[source]

sql_task = DrillOperator(
    task_id="json_to_parquet_table",
    sql="""
    drop table if exists dfs.tmp.employee;
    create table dfs.tmp.employee as select * from cp.`employee.json`;
    """,
)

Reference

For further information, see the Drill documentation on querying data.

Was this entry helpful?