Add template_searchpath support
Hi!
The problem is that ClickhouseOperator doesn't support template_searchpath dag option which allows to pass filename instead of full query
Instead of:
ClickHouseOperator(
task_id='task_1',
clickhouse_conn_id='clickhouse_default',
sql='SELECT * from db.some_table;' # <-- raw SQL query
)
We can write:
ClickHouseOperator(
task_id='task_1',
clickhouse_conn_id='clickhouse_default',
sql='select_query.sql' # <-- filename of jinja template which is located in template_searchpath location
)
Look like it's already done https://github.com/whisklabs/airflow-clickhouse-plugin/pull/41 But requires some additional things
Hi @tiger24l7, thank you for you feedback. Yes, there is an open PR, you are welcome to contribute :)
My python skills are poor I might try to implement this later But currently, would be nice if someone implement this, if possible :)
Contribution is welcome, thank you! I will review you PR and let you know how you may enhance the code.
Implemented in #62