airflow.providers.amazon.aws.operators.neptune

NeptuneStartDbClusterOperator

啟動 Amazon Neptune 資料庫叢集。

NeptuneStopDbClusterOperator

停止 Amazon Neptune 資料庫叢集。

函式

handle_waitable_exception(operator, err)

處理因叢集或例項狀態臨時無效而引發的客戶端異常。

模組內容

airflow.providers.amazon.aws.operators.neptune.handle_waitable_exception(operator, err)[source]

處理因叢集或例項狀態臨時無效而引發的客戶端異常。

狀態更改後,可以重試。等待器 (Waiter) 將處理終止狀態。

class airflow.providers.amazon.aws.operators.neptune.NeptuneStartDbClusterOperator(db_cluster_id, wait_for_completion=True, waiter_delay=30, waiter_max_attempts=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.neptune.NeptuneHook]

啟動 Amazon Neptune 資料庫叢集。

Amazon Neptune 資料庫是專為卓越可擴充套件性和可用性而設計的無伺服器圖資料庫。Neptune 資料庫提供內建安全性、持續備份以及與其他 AWS 服務的整合。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南: 啟動 Neptune 資料庫叢集

引數:
  • db_cluster_id (str) – 要啟動的 Neptune 資料庫叢集的資料庫叢集識別符號。

  • wait_for_completion (bool) – 是否等待叢集啟動完成。(預設值: True)

  • deferrable (bool) – 如果為 True,運算子將非同步等待叢集啟動完成。這意味著需要等待完成。此模式需要安裝 aiobotocore 模組。(預設值: False)

  • waiter_delay (int) – 狀態檢查之間的等待時間(秒)。

  • waiter_max_attempts (int) – 檢查任務完成的最大嘗試次數。

  • aws_conn_id – 用於 AWS 憑據的 Airflow 連線。如果為 None 或空,則使用預設的 boto3 行為。如果以分散式方式執行 Airflow 且 aws_conn_id 為 None 或空,則將使用預設的 boto3 配置(且必須在每個工作節點上維護)。

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。參見:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

返回值:

包含 Neptune 叢集 ID 的字典

aws_hook_class[source]
template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
wait_for_completion = True[source]
deferrable = True[source]
waiter_delay = 30[source]
waiter_max_attempts = 60[source]
execute(context, event=None, **kwargs)[source]

建立運算子時派生。

Context 與渲染 jinja 模板時使用的字典相同。

請參閱 get_template_context 以獲取更多上下文資訊。

execute_complete(context, event=None)[source]
class airflow.providers.amazon.aws.operators.neptune.NeptuneStopDbClusterOperator(db_cluster_id, wait_for_completion=True, waiter_delay=30, waiter_max_attempts=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.neptune.NeptuneHook]

停止 Amazon Neptune 資料庫叢集。

Amazon Neptune 資料庫是專為卓越可擴充套件性和可用性而設計的無伺服器圖資料庫。Neptune 資料庫提供內建安全性、持續備份以及與其他 AWS 服務的整合。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南: 啟動 Neptune 資料庫叢集

引數:
  • db_cluster_id (str) – 要停止的 Neptune 資料庫叢集的資料庫叢集識別符號。

  • wait_for_completion (bool) – 是否等待叢集停止完成。(預設值: True)

  • deferrable (bool) – 如果為 True,運算子將非同步等待叢集停止完成。這意味著需要等待完成。此模式需要安裝 aiobotocore 模組。(預設值: False)

  • waiter_delay (int) – 狀態檢查之間的等待時間(秒)。

  • waiter_max_attempts (int) – 檢查任務完成的最大嘗試次數。

  • aws_conn_id – 用於 AWS 憑據的 Airflow 連線。如果為 None 或空,則使用預設的 boto3 行為。如果以分散式方式執行 Airflow 且 aws_conn_id 為 None 或空,則將使用預設的 boto3 配置(且必須在每個工作節點上維護)。

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。參見:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

返回值:

包含 Neptune 叢集 ID 的字典

aws_hook_class[source]
template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
wait_for_completion = True[source]
deferrable = True[source]
waiter_delay = 30[source]
waiter_max_attempts = 60[source]
execute(context, event=None, **kwargs)[source]

建立運算子時派生。

Context 與渲染 jinja 模板時使用的字典相同。

請參閱 get_template_context 以獲取更多上下文資訊。

execute_complete(context, event=None)[source]

此條目有幫助嗎?