airflow.providers.microsoft.azure.operators.cosmos

Module Contents

Classes

AzureCosmosInsertDocumentOperator

Insert a new document into the specified Cosmos database and collection.

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

Bases: airflow.models.BaseOperator

Insert a new document into the specified Cosmos database and collection.

Both the database and collection will be created automatically if they do not already exist.

Parameters
  • database_name (str) – The name of the database. (templated)

  • collection_name (str) – The name of the collection. (templated)

  • document (dict) – The document to insert

  • azure_cosmos_conn_id (str) – Reference to the Azure CosmosDB connection.

template_fields: Sequence[str] = ('database_name', 'collection_name')[source]
ui_color = '#e4f0e8'[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?