| :py:mod:`airflow.providers.google.cloud.operators.bigtable` |
| =========================================================== |
| |
| .. py:module:: airflow.providers.google.cloud.operators.bigtable |
| |
| .. autoapi-nested-parse:: |
| |
| This module contains Google Cloud Bigtable operators. |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.operators.bigtable.BigtableValidationMixin |
| airflow.providers.google.cloud.operators.bigtable.BigtableCreateInstanceOperator |
| airflow.providers.google.cloud.operators.bigtable.BigtableUpdateInstanceOperator |
| airflow.providers.google.cloud.operators.bigtable.BigtableDeleteInstanceOperator |
| airflow.providers.google.cloud.operators.bigtable.BigtableCreateTableOperator |
| airflow.providers.google.cloud.operators.bigtable.BigtableDeleteTableOperator |
| airflow.providers.google.cloud.operators.bigtable.BigtableUpdateClusterOperator |
| |
| |
| |
| |
| .. py:class:: BigtableValidationMixin |
| |
| Common class for Cloud Bigtable operators for validating required fields. |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = [] |
| |
| |
| |
| |
| .. py:class:: BigtableCreateInstanceOperator(*, instance_id, main_cluster_id, main_cluster_zone, project_id = None, replica_clusters = None, instance_display_name = None, instance_type = None, instance_labels = None, cluster_nodes = None, cluster_storage_type = None, timeout = None, gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator`, :py:obj:`BigtableValidationMixin` |
| |
| Creates a new 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. |
| |
| For more details about instance creation have a look at the reference: |
| https://googleapis.github.io/google-cloud-python/latest/bigtable/instance.html#google.cloud.bigtable.instance.Instance.create |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:BigtableCreateInstanceOperator` |
| |
| :param instance_id: The ID of the Cloud Bigtable instance to create. |
| :param main_cluster_id: The ID for main cluster for the new instance. |
| :param main_cluster_zone: The zone for main cluster |
| See https://cloud.google.com/bigtable/docs/locations for more details. |
| :param project_id: Optional, the ID of the Google Cloud project. If set to None or missing, |
| the default project_id from the Google Cloud connection is used. |
| :param replica_clusters: (optional) A list of replica clusters for the new |
| instance. Each cluster dictionary contains an id and a zone. |
| Example: [{"id": "replica-1", "zone": "us-west1-a"}] |
| :param instance_type: (optional) The type of the instance. |
| :param instance_display_name: (optional) Human-readable name of the instance. Defaults |
| to ``instance_id``. |
| :param instance_labels: (optional) Dictionary of labels to associate |
| with the instance. |
| :param cluster_nodes: (optional) Number of nodes for cluster. |
| :param cluster_storage_type: (optional) The type of storage. |
| :param timeout: (optional) timeout (in seconds) for instance creation. |
| If None is not specified, Operator will wait indefinitely. |
| :param gcp_conn_id: The connection ID to use to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = ['instance_id', 'main_cluster_id', 'main_cluster_zone'] |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['project_id', 'instance_id', 'main_cluster_id', 'main_cluster_zone', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: BigtableUpdateInstanceOperator(*, instance_id, project_id = None, instance_display_name = None, instance_type = None, instance_labels = None, timeout = None, gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator`, :py:obj:`BigtableValidationMixin` |
| |
| Updates an existing Cloud Bigtable instance. |
| |
| For more details about instance creation have a look at the reference: |
| https://googleapis.dev/python/bigtable/latest/instance.html#google.cloud.bigtable.instance.Instance.update |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:BigtableUpdateInstanceOperator` |
| |
| :param instance_id: The ID of the Cloud Bigtable instance to update. |
| :param project_id: Optional, the ID of the Google Cloud project. If set to None or missing, |
| the default project_id from the Google Cloud connection is used. |
| :param instance_display_name: (optional) Human-readable name of the instance. |
| :param instance_type: (optional) The type of the instance. |
| :param instance_labels: (optional) Dictionary of labels to associate |
| with the instance. |
| :param timeout: (optional) timeout (in seconds) for instance update. |
| If None is not specified, Operator will wait indefinitely. |
| :param gcp_conn_id: The connection ID to use to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = ['instance_id'] |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['project_id', 'instance_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: BigtableDeleteInstanceOperator(*, instance_id, project_id = None, gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator`, :py:obj:`BigtableValidationMixin` |
| |
| Deletes the Cloud Bigtable instance, including its clusters and all related tables. |
| |
| For more details about deleting instance have a look at the reference: |
| https://googleapis.github.io/google-cloud-python/latest/bigtable/instance.html#google.cloud.bigtable.instance.Instance.delete |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:BigtableDeleteInstanceOperator` |
| |
| :param instance_id: The ID of the Cloud Bigtable instance to delete. |
| :param project_id: Optional, the ID of the Google Cloud project. If set to None or missing, |
| the default project_id from the Google Cloud connection is used. |
| :param gcp_conn_id: The connection ID to use to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = ['instance_id'] |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['project_id', 'instance_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: BigtableCreateTableOperator(*, instance_id, table_id, project_id = None, initial_split_keys = None, column_families = None, gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator`, :py:obj:`BigtableValidationMixin` |
| |
| Creates the table in the Cloud Bigtable instance. |
| |
| For more details about creating table have a look at the reference: |
| https://googleapis.github.io/google-cloud-python/latest/bigtable/table.html#google.cloud.bigtable.table.Table.create |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:BigtableCreateTableOperator` |
| |
| :param instance_id: The ID of the Cloud Bigtable instance that will |
| hold the new table. |
| :param table_id: The ID of the table to be created. |
| :param project_id: Optional, the ID of the Google Cloud project. If set to None or missing, |
| the default project_id from the Google Cloud connection is used. |
| :param initial_split_keys: (Optional) list of row keys in bytes that will be used to |
| initially split the table into several tablets. |
| :param column_families: (Optional) A map columns to create. |
| The key is the column_id str and the value is a |
| :class:`google.cloud.bigtable.column_family.GarbageCollectionRule` |
| :param gcp_conn_id: The connection ID to use to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = ['instance_id', 'table_id'] |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['project_id', 'instance_id', 'table_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: BigtableDeleteTableOperator(*, instance_id, table_id, project_id = None, app_profile_id = None, gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator`, :py:obj:`BigtableValidationMixin` |
| |
| Deletes the Cloud Bigtable table. |
| |
| For more details about deleting table have a look at the reference: |
| https://googleapis.github.io/google-cloud-python/latest/bigtable/table.html#google.cloud.bigtable.table.Table.delete |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:BigtableDeleteTableOperator` |
| |
| :param instance_id: The ID of the Cloud Bigtable instance. |
| :param table_id: The ID of the table to be deleted. |
| :param project_id: Optional, the ID of the Google Cloud project. If set to None or missing, |
| the default project_id from the Google Cloud connection is used. |
| :param app_profile_id: Application profile. |
| :param gcp_conn_id: The connection ID to use to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = ['instance_id', 'table_id'] |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['project_id', 'instance_id', 'table_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: BigtableUpdateClusterOperator(*, instance_id, cluster_id, nodes, project_id = None, gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator`, :py:obj:`BigtableValidationMixin` |
| |
| Updates a Cloud Bigtable cluster. |
| |
| For more details about updating a Cloud Bigtable cluster, |
| have a look at the reference: |
| https://googleapis.github.io/google-cloud-python/latest/bigtable/cluster.html#google.cloud.bigtable.cluster.Cluster.update |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:BigtableUpdateClusterOperator` |
| |
| :param instance_id: The ID of the Cloud Bigtable instance. |
| :param cluster_id: The ID of the Cloud Bigtable cluster to update. |
| :param nodes: The desired number of nodes for the Cloud Bigtable cluster. |
| :param project_id: Optional, the ID of the Google Cloud project. |
| :param gcp_conn_id: The connection ID to use to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: REQUIRED_ATTRIBUTES |
| :annotation: :Iterable[str] = ['instance_id', 'cluster_id', 'nodes'] |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['project_id', 'instance_id', 'cluster_id', 'nodes', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |