Apache Airflow backport provider package for Apache Sqoop integration, providing SqoopHook and SqoopOperator for data import/export between relational databases and Hadoop
Overall
score
92%
Design an Airflow DAG that exports curated Hive data into a relational database table through the dependency's Sqoop export capability. The DAG must focus on reliably moving data from a specific HDFS directory to a target table with explicit handling for nulls, delimiters, and staging safety.
@generates
build_export_dag returns a DAG containing exactly one export task that moves data from the provided source_dir in HDFS/Hive into the provided target_table using the provided connection id; the DAG id and schedule come from the function arguments. @teststaging_table and clears that staging table before loading the final target. @testfrom typing import Optional
def build_export_dag(
dag_id: str,
conn_id: str,
source_dir: str,
target_table: str,
staging_table: str,
null_string: str,
null_non_string: str,
field_delimiter: str,
line_delimiter: str,
schedule: str = "@daily",
clear_staging: bool = True,
use_batch: bool = True,
relaxed_isolation: bool = True,
) -> "DAG":
"""Creates a DAG that performs the export as described."""Provides Airflow support for Sqoop-based imports and exports between HDFS/Hive and relational databases. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-apache-airflow-backport-providers-apache-sqoopdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10