import ClickHouseHook in airflow 1.10.12

Viewed 568

I try to import class ClickHouseHook from airflow.hooks.clickhouse_hook

from airflow.hooks.clickhouse_hook import ClickHouseHook

This is no problem. No import errors here.

But when I try:

import airflow.hooks.clickhouse_hook

I have an error:

ModuleNotFoundError: No module named 'airflow.hooks.clickhouse_hook'

And I can't understand how it works? I have no module named clickhouse_hook in directory airflow.hooks, but how can I import class ClickHouseHook without error in this way?

1 Answers

There is no ClickHouse provider in Airflow. I assume you are using clickhouse plugin thus the clickhouse_hook file is not in airflow/hooks folder because it is not part of Airflow.

Related