PutAzureCosmosDBRecord

Description:

This processor is a record-aware processor for inserting data into Cosmos DB with Core SQL API. It uses a configured record reader and schema to read an incoming record set from the body of a Flowfile and then inserts those records into a configured Cosmos DB Container.

Tags:

azure, cosmos, insert, record, put

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property is considered "sensitive", meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

NameDefault ValueAllowable ValuesDescription
Cosmos DB Connection ServiceController Service API:
AzureCosmosDBConnectionService
Implementation: AzureCosmosDBClientService
If configured, the controller service used to obtain the connection string and access key
Cosmos DB URICosmos DB URI, typically in the form of https://{databaseaccount}.documents.azure.com:443/ Note this host URL is for Cosmos DB with Core SQL API from Azure Portal (Overview->URI)
Sensitive Property: true
Cosmos DB Access KeyCosmos DB Access Key from Azure Portal (Settings->Keys). Choose a read-write key to enable database or container creation at run time
Sensitive Property: true
Cosmos DB Consistency LevelSESSION
  • STRONG
  • BOUNDED_STALENESS
  • SESSION
  • CONSISTENT_PREFIX
  • EVENTUAL
Choose from five consistency levels on the consistency spectrum. Refer to Cosmos DB documentation for their differences
Cosmos DB NameThe database name or id. This is used as the namespace for document collections or containers
Cosmos DB Container IDThe unique identifier for the container
Cosmos DB Partition KeyThe partition key used to distribute data among servers
Record ReaderController Service API:
RecordReaderFactory
Implementations: JsonPathReader
AvroReader
XMLReader
WindowsEventLogReader
ReaderLookup
Syslog5424Reader
GrokReader
ScriptedReader
CSVReader
SyslogReader
ParquetReader
JsonTreeReader
CEFReader
Specifies the Controller Service to use for parsing incoming data and determining the data's schema
Insert Batch Size20The number of records to group together for one single insert operation against Cosmos DB
Cosmos DB Conflict Handling StrategyIGNORE
  • Ignore Conflicting records will not be inserted, and FlowFile will not be routed to failure
  • Upsert Conflicting records will be upserted, and FlowFile will not be routed to failure
Choose whether to ignore or upsert when conflict error occurs during insertion

Relationships:

NameDescription
successAll FlowFiles that are written to Cosmos DB are routed to this relationship
failureAll FlowFiles that cannot be written to Cosmos DB are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

ResourceDescription
MEMORYAn instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance.