class_docstr: Airflow-specific TFX Component.
  
  This class wrap a component run into its own PythonOperator in Airflow.
docstr: Constructs an Airflow implementation of TFX component.
  
  Args:
    parent_dag: An AirflowPipeline instance as the pipeline DAG.
    component: An instance of base_node.BaseNode that holds all
      properties of a logical component.
    component_launcher_class: The class of the launcher to launch the
      component.
    pipeline_info: An instance of data_types.PipelineInfo that holds pipeline
      properties.
    enable_cache: Whether or not cache is enabled for this component run.
    metadata_connection_config: A config proto for metadata connection.
    beam_pipeline_args: Pipeline arguments for Beam powered Components.
    additional_pipeline_args: Additional pipeline args.
    component_config: Component config to launch the component.
    **kwargs: Addtional params passed to the base class, PythonOperator.
docstr_tok: ["Constructs","an","Airflow","implementation","of","TFX","component",".","Args",":","parent_dag",":","An","AirflowPipeline","instance","as","the","pipeline","DAG",".","component",":","An","instance","of","base_node.BaseNode","that","holds","all","properties","of","a","logical","component",".","component_launcher_class",":","The","class","of","the","launcher","to","launch","the","component",".","pipeline_info",":","An","instance","of","data_types.PipelineInfo","that","holds","pipeline","properties",".","enable_cache",":","Whether","or","not","cache","is","enabled","for","this","component","run",".","metadata_connection_config",":","A","config","proto","for","metadata","connection",".","beam_pipeline_args",":","Pipeline","arguments","for","Beam","powered","Components",".","additional_pipeline_args",":","Additional","pipeline","args",".","component_config",":","Component","config","to","launch","the","component",".","*","*","kwargs",":","Addtional","params","passed","to","the","base","class",",","PythonOperator","."]
code: def __init__(
      self,
      *,
      parent_dag: models.DAG,
      component: base_node.BaseNode,
      component_launcher_class: Type[
          base_component_launcher.BaseComponentLauncher
      ],
      pipeline_info: data_types.PipelineInfo,
      enable_cache: bool,
      metadata_connection_config: metadata_store_pb2.ConnectionConfig,
      beam_pipeline_args: List[str],
      additional_pipeline_args: Dict[str, Any],
      component_config: base_component_config.BaseComponentConfig,
      **kwargs,
  ):
      """Constructs an Airflow implementation of TFX component.
  
      Args:
        parent_dag: An AirflowPipeline instance as the pipeline DAG.
        component: An instance of base_node.BaseNode that holds all
          properties of a logical component.
        component_launcher_class: The class of the launcher to launch the
          component.
        pipeline_info: An instance of data_types.PipelineInfo that holds pipeline
          properties.
        enable_cache: Whether or not cache is enabled for this component run.
        metadata_connection_config: A config proto for metadata connection.
        beam_pipeline_args: Pipeline arguments for Beam powered Components.
        additional_pipeline_args: Additional pipeline args.
        component_config: Component config to launch the component.
        **kwargs: Addtional params passed to the base class, PythonOperator.
      """
      # Prepare parameters to create TFX worker.
      driver_args = data_types.DriverArgs(enable_cache=enable_cache)
  
      exec_properties = component.exec_properties
  
      super().__init__(
          task_id=component.id,
          # TODO(b/183172663): Delete `provide_context` when we drop support of
          # airflow 1.x.
          provide_context=True,
          python_callable=functools.partial(
              _airflow_component_launcher,
              component=component,
              component_launcher_class=component_launcher_class,
              pipeline_info=pipeline_info,
              driver_args=driver_args,
              metadata_connection_config=metadata_connection_config,
              beam_pipeline_args=beam_pipeline_args,
              additional_pipeline_args=additional_pipeline_args,
              component_config=component_config,
          ),
          # op_kwargs is a templated field for PythonOperator, which means Airflow
          # will inspect the dictionary and resolve any templated fields.
          op_kwargs={"exec_properties": exec_properties},
          dag=parent_dag,
          **kwargs,
      )
  
file_path: tfx/tfx/orchestration/airflow/airflow_component.py
imports: import functools
  from typing import Any, Dict, List, Type
  from airflow import models
  from airflow.operators import python_operator
  from tfx.dsl.components.base import base_node
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.orchestration.config import base_component_config
  from tfx.orchestration.launcher import base_component_launcher
  from tfx.utils import telemetry_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new AirflowComponent object from inherited base classes: python_operator with example: obj = AirflowComponent()