airflow.contrib.operators.azure_cosmos_operator

Module Contents

class airflow.contrib.operators.azure_cosmos_operator.AzureCosmosInsertDocumentOperator(database_name, collection_name, document, azure_cosmos_conn_id='azure_cosmos_default', *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Inserts a new document into the specified Cosmos database and collection It will create both the database and collection 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 a CosmosDB connection.

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

Was this entry helpful?