{"id":27591,"library":"apache-airflow-providers-ydb","title":"Apache Airflow Provider for YDB","description":"Apache Airflow provider that enables integration with Yandex Database (YDB). Current version is 2.5.2, supports Airflow 2.8+ and Python 3.10+. Released on a monthly cadence alongside Airflow.","status":"active","version":"2.5.2","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/ydb","tags":["airflow","provider","ydb","ydb-database","etl"],"install":[{"cmd":"pip install apache-airflow-providers-ydb","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required: Airflow provider package dependency","package":"apache-airflow","optional":false},{"reason":"Required: YDB Python SDK","package":"ydb","optional":false}],"imports":[{"note":"Common mistake: direct import of ydb SDK instead of Airflow hook","wrong":"import ydb","symbol":"YdbHook","correct":"from airflow.providers.ydb.hooks.ydb import YdbHook"},{"note":"Wrong module path: YdbOperator is in providers.ydb.operators","wrong":"from airflow.operators import YdbOperator","symbol":"YdbOperator","correct":"from airflow.providers.ydb.operators.ydb import YdbOperator"},{"note":"Transfer operators are under providers.ydb.transfers","wrong":"from airflow.transfers import YdbToDWHOperator","symbol":"YdbToDWHOperator","correct":"from airflow.providers.ydb.transfers.ydb_to_dwh import YdbToDWHOperator"}],"quickstart":{"code":"from datetime import datetime\nfrom airflow import DAG\nfrom airflow.providers.ydb.operators.ydb import YdbOperator\n\ndefault_args = {\\n    'start_date': datetime(2024, 1, 1),\\n    'conn_id': 'ydb_default'\\n}\n\nwith DAG('ydb_dag', default_args=default_args, schedule_interval=None) as dag:\\n    task = YdbOperator(\n        task_id='execute_query',\n        sql='SELECT 1;',\n        ydb_conn_id='ydb_default'\n    )","lang":"python","description":"Create a DAG that executes a YDB query using the YdbOperator. Requires an Airflow connection 'ydb_default' configured with YDB endpoint and database."},"warnings":[{"fix":"Update Airflow connection to use 'extra' field with 'endpoint' and 'database' keys instead of 'token'.","message":"In version 2.0.0, connection parameters changed from token-based to connection string. Existing connections must be updated.","severity":"breaking","affected_versions":">=2.0.0,<3.0.0"},{"fix":"Migrate to YdbToClickhouseOperator for ClickHouse integration.","message":"YdbToDWHOperator is deprecated as of v2.5.0, use YdbToClickhouseOperator or custom transfer.","severity":"deprecated","affected_versions":">=2.5.0"},{"fix":"Set 'ssl_verify': 'false' in the connection's extra JSON if using self-signed certificates.","message":"SSL verification is enabled by default; internal clusters may need SSL disabled in connection extra.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"In Airflow UI, edit YDB connection and set Extra to: {\"endpoint\": \"grpcs://ydb.serverless.yandexcloud.net:2135\", \"database\": \"/ru-central1/b1g...\"}","cause":"Connection 'ydb_default' is missing required extra fields 'endpoint' or 'database'.","error":"airflow.exceptions.AirflowException: Failed to create YDB driver.   Check your connection parameters."},{"fix":"Run: pip install ydb","cause":"YDB SDK is not installed. The provider does not include it automatically.","error":"ModuleNotFoundError: No module named 'ydb'"},{"fix":"Upgrade to >=2.0.0: pip install -U apache-airflow-providers-ydb. Use 'sql' parameter.","cause":"Wrong version of Airflow provider package (older than v2.0.0) where operator used 'query' parameter.","error":"TypeError: YdbOperator.__init__() got an unexpected keyword argument 'sql'"},{"fix":"Ensure endpoint is reachable and correct. If using self-signed certs, set extra: {\"ssl_verify\": false}.","cause":"Connection timeout or network issue; often due to missing TLS certificate or wrong endpoint.","error":"ydb.issues.Unavailable: cannot connect to database, session is not ready"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}