所有 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.

Composer Dataproc Workflow Instantiate Operator Tutorial (Airflow 1)

Example Airflow DAG that kicks off a Cloud Dataproc Template that runs a Spark Pi Job.

View in documentation

DAG unit testing

A sample unit test for a Python DAG.

DAG: Clean up metadata DB

Sample DAG that enables users to clean up their Airflow metadata database

DAG: Clean up metadata DB (Airflow 1)

Sample DAG that enables users to clean up their Airflow metadata database

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.

Get environment client ID

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

List Composer Image Versions

Lists image versions for Cloud Composer

Use local dependencies

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

Using a custom Airflow connection

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

View in documentation