Apache Airflow Provider for Apache Kylin
raw JSON → 3.10.4 verified Fri May 01 auth: no python
Apache Airflow provider for Apache Kylin, enabling integration with Kylin's REST API for cube operations, querying, and metadata management. Current version is 3.10.4, with release cadence following Airflow's provider release cycle.
pip install apache-airflow-providers-apache-kylin Common errors
error ModuleNotFoundError: No module named 'airflow.providers.apache.kylin' ↓
cause Provider package not installed or not activated in Airflow environment.
fix
Run
pip install apache-airflow-providers-apache-kylin and ensure Airflow is restarted. error AttributeError: module 'airflow.providers.apache.kylin.hooks.kylin' has no attribute 'KylinHook' ↓
cause Incorrect import path or using an older provider version where the hook was elsewhere.
fix
Use
from airflow.providers.apache.kylin.hooks.kylin import KylinHook and update to provider version >=3.0.0. error airflow.exceptions.AirflowException: The conn_id `kylin_default` isn't defined ↓
cause A Kylin connection with that ID has not been created in Airflow.
fix
Create the connection via Airflow UI (Admin -> Connections) or via environment variable
AIRFLOW_CONN_KYLIN_DEFAULT. Warnings
breaking In provider version 3.0.0, the import paths changed from `airflow.hooks.kylin_hook` to `airflow.providers.apache.kylin.hooks.kylin`. ↓
fix Update imports to use the new provider path: `from airflow.providers.apache.kylin.hooks.kylin import KylinHook`.
deprecated The `kylin_conn_type` parameter in KylinHook is deprecated and will be removed in future versions. ↓
fix Use the connection type defined in the Airflow UI instead of passing `kylin_conn_type`.
gotcha KylinHook methods like `get_cubes()` may return empty results if the Kylin service is in a different namespace or if the connection lacks proper authorization. ↓
fix Verify that the Kylin connection's host, port, username, and password are correct, and test the connection using `hook.test_connection()`.
Imports
- KylinHook wrong
from airflow.hooks.kylin_hook import KylinHookcorrectfrom airflow.providers.apache.kylin.hooks.kylin import KylinHook - KylinOperator wrong
from airflow.operators.kylin_operator import KylinOperatorcorrectfrom airflow.providers.apache.kylin.operators.kylin import KylinOperator
Quickstart
from airflow import DAG
from airflow.providers.apache.kylin.hooks.kylin import KylinHook
from datetime import datetime
hook = KylinHook(kylin_conn_id='kylin_default')
cubes = hook.get_cubes()
print(cubes)