All examples below rely on the following variables, which can be passed via environment variables.
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py
Use the ~airflow.contrib.operators.gcp_bigtable_operator.BigtableInstanceCreateOperator
to create a Google Cloud Bigtable instance.
If the Cloud Bigtable instance with the given ID exists, the operator does not compare its configuration and immediately succeeds. No changes are made to the existing instance.
You can create the operator with or without project id. If project id is missing it will be retrieved from the GCP connection used. Both variants are shown:
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py
Use the ~airflow.contrib.operators.gcp_bigtable_operator.BigtableInstanceDeleteOperator
to delete a Google Cloud Bigtable instance.
You can create the operator with or without project id. If project id is missing it will be retrieved from the GCP connection used. Both variants are shown:
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py
Use the ~airflow.contrib.operators.gcp_bigtable_operator.BigtableClusterUpdateOperator
to modify number of nodes in a Cloud Bigtable cluster.
You can create the operator with or without project id. If project id is missing it will be retrieved from the GCP connection used. Both variants are shown:
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py
Creates a table in a Cloud Bigtable instance.
If the table with given ID exists in the Cloud Bigtable instance, the operator compares the Column Families. If the Column Families are identical operator succeeds. Otherwise, the operator fails with the appropriate error message.
You can create the operator with or without project id. If project id is missing it will be retrieved from the GCP connection used. Both variants are shown:
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py
When creating a table, you can specify the optional initial_split_keys
and column_families
. Please refer to the Python Client for Google Cloud Bigtable documentation for Table and for Column Families.
Use the ~airflow.contrib.operators.gcp_bigtable_operator.BigtableTableDeleteOperator
to delete a table in Google Cloud Bigtable.
You can create the operator with or without project id. If project id is missing it will be retrieved from the GCP connection used. Both variants are shown:
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py
You can create the operator with or without project id. If project id is missing it will be retrieved from the GCP connection used. Both variants are shown:
Use the ~airflow.contrib.operators.gcp_bigtable_operator.BigtableTableWaitForReplicationSensor
to wait for the table to replicate fully.
The same arguments apply to this sensor as the BigtableTableCreateOperator.
Note: If the table or the Cloud Bigtable instance does not exist, this sensor waits for the table until timeout hits and does not raise any exception.
../../../../airflow/contrib/example_dags/example_gcp_bigtable_operators.py