{"id":9474,"library":"apache-airflow-providers-teradata","title":"Teradata Provider for Apache Airflow","description":"The `apache-airflow-providers-teradata` package provides an official Teradata provider for Apache Airflow, enabling interaction with Teradata databases via Airflow DAGs. It includes hooks and operators for executing SQL queries and managing data. The current version is 3.5.2, and it typically releases updates aligned with Airflow's core release cycle or when significant bug fixes/features are added.","status":"active","version":"3.5.2","language":"en","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/teradata","tags":["airflow","provider","teradata","database","etl"],"install":[{"cmd":"pip install apache-airflow-providers-teradata","lang":"bash","label":"Install Teradata Provider"}],"dependencies":[{"reason":"Core Airflow installation is required for any provider.","package":"apache-airflow","optional":false},{"reason":"Database driver for connecting to Teradata.","package":"teradatasql","optional":false}],"imports":[{"symbol":"TeradataHook","correct":"from airflow.providers.teradata.hooks.teradata import TeradataHook"},{"symbol":"TeradataOperator","correct":"from airflow.providers.teradata.operators.teradata import TeradataOperator"}],"quickstart":{"code":"from __future__ import annotations\n\nimport pendulum\n\nfrom airflow.models.dag import DAG\nfrom airflow.providers.teradata.operators.teradata import TeradataOperator\n\nwith DAG(\n    dag_id=\"teradata_example_dag\",\n    start_date=pendulum.datetime(2023, 1, 1, tz=\"UTC\"),\n    catchup=False,\n    schedule=None,\n    tags=[\"teradata\", \"example\"],\n) as dag:\n    # This task requires an Airflow connection named 'teradata_default'\n    # configured with appropriate Teradata credentials (host, port, schema, user, password).\n    run_teradata_query = TeradataOperator(\n        task_id=\"run_simple_query\",\n        sql=\"SELECT 1;\",\n        teradata_conn_id=\"teradata_default\", # Ensure this connection exists in Airflow UI\n    )","lang":"python","description":"A simple Airflow DAG that uses the `TeradataOperator` to execute a basic SQL query against a Teradata database. Requires an Airflow connection named `teradata_default` to be configured in the Airflow UI or via environment variables, specifying the Teradata host, port, username, password, and optionally a database."},"warnings":[{"fix":"Ensure the connection ID matches, and the Teradata connection in Airflow UI (Admin -> Connections) or environment variables (e.g., AIRFLOW_CONN_TERADATA_DEFAULT) is correctly configured with all necessary parameters like host, port, schema, login, and password.","message":"The `teradata_conn_id` parameter in operators and hooks must correspond to an existing Teradata connection configured in Airflow. Misconfigurations (wrong host, port, credentials) are a common source of failures.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Check the `apache-airflow-providers-teradata` GitHub repository or Airflow documentation for any specific `teradatasql` version requirements. If issues arise, try upgrading or downgrading `teradatasql` (`pip install --upgrade teradatasql==X.Y.Z`) or the provider itself.","message":"Specific versions of the `teradatasql` Python driver might be required or recommended for certain Teradata database versions or features. Ensure compatibility, especially when encountering unexpected connection or query execution errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the `teradatasql` documentation and Airflow Teradata provider documentation for detailed SSL/TLS configuration options. Add relevant parameters to the 'Extra' field of your Airflow Teradata connection.","message":"Secure connections using SSL/TLS might require additional configuration parameters in the Airflow connection, such as `ssl_mode` or `ca_cert_path`. If not configured correctly, it can lead to connection failures.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Install the `teradatasql` package: `pip install teradatasql` (or reinstall the provider which pulls it in: `pip install apache-airflow-providers-teradata`).","cause":"The `teradatasql` Python driver, which is a required dependency for the Teradata provider, is not installed in the Airflow environment.","error":"ModuleNotFoundError: No module named 'teradatasql'"},{"fix":"Ensure that the `teradata_conn_id` argument in your operator/hook matches an existing connection ID configured in Airflow. Verify its presence and correctness in the Airflow UI (Admin -> Connections) or environment variables.","cause":"The `teradata_conn_id` specified in the operator or hook does not exist or is empty. This prevents Airflow from establishing a connection to the Teradata database.","error":"airflow.exceptions.AirflowException: The teradata_conn_id parameter is missing or invalid."},{"fix":"Double-check the host and port specified in your Airflow Teradata connection. Verify network connectivity from your Airflow worker to the Teradata server. Consult your network or database administrator if necessary.","cause":"A generic connection error indicating issues reaching the Teradata database. Common causes include incorrect host/port, network firewalls, or the database service being down.","error":"teradatasql.OperationalError: [HY000] [2000] Error while connecting to database. (DBMSG: [2000] [HY000] Cannot resolve host name.)"}]}