airflow.providers.microsoft.azure.operators.cosmos

模組內容

類別

AzureCosmosInsertDocumentOperator

將新文件插入指定的 Cosmos 資料庫和集合中。

class airflow.providers.microsoft.azure.operators.cosmos.AzureCosmosInsertDocumentOperator(*, database_name, collection_name, document, azure_cosmos_conn_id='azure_cosmos_default', **kwargs)[原始碼]

基底類別: airflow.models.BaseOperator

將新文件插入指定的 Cosmos 資料庫和集合中。

如果資料庫和集合尚不存在,則會自動建立。

參數
  • database_name (str) – 資料庫的名稱。(已套用 Jinja 模板)

  • collection_name (str) – 集合的名稱。(已套用 Jinja 模板)

  • document (dict) – 要插入的文件

  • azure_cosmos_conn_id (str) – 參考至 Azure CosmosDB 連線

template_fields: collections.abc.Sequence[str] = ('database_name', 'collection_name')[原始碼]
ui_color = '#e4f0e8'[原始碼]
execute(context)[原始碼]

在建立運算子時衍生。

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

請參閱 get_template_context 以取得更多上下文。

這個條目是否有幫助?