blob: 8104c77446bd290bf4d2b59ccdbf0de46ba41b52 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>PutMongoRecord</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">PutMongoRecord</h1><h2>Description: </h2><p>This processor is a record-aware processor for inserting/upserting data into MongoDB. It uses a configured record reader and schema to read an incoming record set from the body of a flowfile and then inserts/upserts batches of those records into a configured MongoDB collection. This processor does not support deletes. The number of documents to insert/upsert at a time is controlled by the "Batch Size" configuration property. This value should be set to a reasonable size to ensure that MongoDB is not overloaded with too many operations at once.</p><h3>Tags: </h3><p>mongodb, insert, update, upsert, record, put</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name">Client Service</td><td>mongo-client-service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>MongoDBClientService<br/><strong>Implementation: </strong><a href="../../../nifi-mongodb-services-nar/1.19.1/org.apache.nifi.mongodb.MongoDBControllerService/index.html">MongoDBControllerService</a></td><td id="description">If configured, this property will use the assigned client service for connection pooling.</td></tr><tr><td id="name">Mongo URI</td><td>Mongo URI</td><td></td><td id="allowable-values"></td><td id="description">MongoURI, typically of the form: mongodb://host1[:port1][,host2[:port2],...]<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Mongo Database Name</strong></td><td>Mongo Database Name</td><td></td><td id="allowable-values"></td><td id="description">The name of the database to use<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Mongo Collection Name</strong></td><td>Mongo Collection Name</td><td></td><td id="allowable-values"></td><td id="description">The name of the collection to use<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">SSL Context Service</td><td>ssl-context-service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>SSLContextService<br/><strong>Implementations: </strong><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardRestrictedSSLContextService/index.html">StandardRestrictedSSLContextService</a><br/><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardSSLContextService/index.html">StandardSSLContextService</a></td><td id="description">The SSL Context Service used to provide client certificate information for TLS/SSL connections.</td></tr><tr><td id="name">Client Auth</td><td>ssl-client-auth</td><td id="default-value">REQUIRED</td><td id="allowable-values"><ul><li>WANT</li><li>REQUIRED</li><li>NONE</li></ul></td><td id="description">Client authentication policy when connecting to secure (TLS/SSL) cluster. Possible values are REQUIRED, WANT, NONE. This property is only used when an SSL Context has been defined and enabled.</td></tr><tr><td id="name"><strong>Write Concern</strong></td><td>Write Concern</td><td id="default-value">ACKNOWLEDGED</td><td id="allowable-values"><ul><li>ACKNOWLEDGED</li><li>UNACKNOWLEDGED</li><li>FSYNCED</li><li>JOURNALED</li><li>REPLICA_ACKNOWLEDGED</li><li>MAJORITY</li><li>W1</li><li>W2</li><li>W3</li></ul></td><td id="description">The write concern to use</td></tr><tr><td id="name"><strong>Record Reader</strong></td><td>record-reader</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>RecordReaderFactory<br/><strong>Implementations: </strong><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.grok.GrokReader/index.html">GrokReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.xml.XMLReader/index.html">XMLReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.avro.AvroReader/index.html">AvroReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.syslog.Syslog5424Reader/index.html">Syslog5424Reader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.cef.CEFReader/index.html">CEFReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.syslog.SyslogReader/index.html">SyslogReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.json.JsonTreeReader/index.html">JsonTreeReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.csv.CSVReader/index.html">CSVReader</a><br/><a href="../../../nifi-scripting-nar/1.19.1/org.apache.nifi.record.script.ScriptedReader/index.html">ScriptedReader</a><br/><a href="../../../nifi-parquet-nar/1.19.1/org.apache.nifi.parquet.ParquetReader/index.html">ParquetReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.json.JsonPathReader/index.html">JsonPathReader</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.lookup.ReaderLookup/index.html">ReaderLookup</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.windowsevent.WindowsEventLogReader/index.html">WindowsEventLogReader</a></td><td id="description">Specifies the Controller Service to use for parsing incoming data and determining the data's schema</td></tr><tr><td id="name"><strong>Batch Size</strong></td><td>insert_count</td><td id="default-value">100</td><td id="allowable-values"></td><td id="description">The number of records to group together for one single insert/upsert operation against MongoDB.</td></tr><tr><td id="name"><strong>Ordered</strong></td><td>ordered</td><td id="default-value">False</td><td id="allowable-values"><ul><li>True</li><li>False</li></ul></td><td id="description">Perform ordered or unordered operations</td></tr><tr><td id="name"><strong>Bypass Validation</strong></td><td>bypass-validation</td><td id="default-value">True</td><td id="allowable-values"><ul><li>True</li><li>False</li></ul></td><td id="description">Bypass schema validation during insert/upsert</td></tr><tr><td id="name">Update Key Fields</td><td>update-key-fields</td><td></td><td id="allowable-values"></td><td id="description">Comma separated list of fields based on which to identify documents that need to be updated. If this property is set NiFi will attempt an upsert operation on all documents. If this property is not set all documents will be inserted.</td></tr><tr><td id="name">Update Mode</td><td>update-mode</td><td id="default-value">Update One</td><td id="allowable-values"><ul><li>Update One <img src="../../../../../html/images/iconInfo.png" alt="Updates only the first document that matches the query." title="Updates only the first document that matches the query."></img></li><li>Update Many <img src="../../../../../html/images/iconInfo.png" alt="Updates every document that matches the query." title="Updates every document that matches the query."></img></li><li>Use 'mongodb.update.mode' flowfile attribute. <img src="../../../../../html/images/iconInfo.png" alt="Use the value of the 'mongodb.update.mode' attribute of the incoming flowfile. Acceptable values are 'one' and 'many'." title="Use the value of the 'mongodb.update.mode' attribute of the incoming flowfile. Acceptable values are 'one' and 'many'."></img></li></ul></td><td id="description">Choose between updating a single document or multiple documents per incoming record.<br/><br/><strong>This Property is only considered if </strong><strong>the [Update Key Fields] Property has a value specified.</strong></td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>All FlowFiles that are written to MongoDB are routed to this relationship</td></tr><tr><td>failure</td><td>All FlowFiles that cannot be written to MongoDB are routed to this relationship</td></tr></table><h3>Reads Attributes: </h3><table id="reads-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>mongodb.update.mode</td><td>Configurable parameter for controlling update mode on a per-flowfile basis. Acceptable values are 'one' and 'many' and controls whether a single incoming record should update a single or multiple Mongo documents.</td></tr></table><h3>Writes Attributes: </h3>None specified.<h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component requires an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>