Todas las muestras de Cloud Composer

This page contains code samples for Cloud Composer. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.

DAG unit testing

A sample unit test for a Python DAG.

Email notification on failure

Configure an Apache Airflow DAG to notify by using email on failure in Cloud Composer.

View in documentation

Explicity using the default Airflow connection

Run a task while explicitly configuring Composer to use the default Airflow connection.

View in documentation

Get Cloud Storage location for DAGs in your environment

Retrieves the Cloud Storage bucket and directory for DAGs in your Composer environment.

View in documentation

Get environment client ID

Get the client ID of a Composer environment's Identity-Aware Proxy.

View in documentation

Implicitly using the default Airflow connection

Run a task without setting the Airflow connection. The default connection will be used.

View in documentation

Use local dependencies

Use local dependencies in an Apache Airflow DAG, running on Cloud Composer.

View in documentation

Use the BashOperator to run the BigQuery bq command

Use the BashOperator in an Apache Airflow DAG to call the BigQuery bq command.

View in documentation

Use the BigQueryInsertJobOperator

Use the BigQueryInsertJobOperator in an Apache Airflow DAG to run a BigQuery query from Cloud Composer.

View in documentation

Use the EmailOperator

An Apache Airflow DAG that uses the EmailOperator to send an email confirmation in Cloud Composer.

View in documentation

Using a custom Airflow connection

Run a task using a custom Airflow connection that you have previously created.

View in documentation