blob: 92712305a597f22b8ffeeb31893b011841362d60 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>GetMongoRecord</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;">GetMongoRecord</h1><h2>Description: </h2><p>A record-based version of GetMongo that uses the Record writers to write the MongoDB result set.</p><p><a href="additionalDetails.html">Additional Details...</a></p><h3>Tags: </h3><p>mongo, mongodb, get, fetch, record, json</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"><strong>Record Writer</strong></td><td>get-mongo-record-writer-factory</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>RecordSetWriterFactory<br/><strong>Implementations: </strong><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.text.FreeFormTextRecordSetWriter/index.html">FreeFormTextRecordSetWriter</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.avro.AvroRecordSetWriter/index.html">AvroRecordSetWriter</a><br/><a href="../../../nifi-scripting-nar/1.19.1/org.apache.nifi.record.script.ScriptedRecordSetWriter/index.html">ScriptedRecordSetWriter</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.csv.CSVRecordSetWriter/index.html">CSVRecordSetWriter</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.xml.XMLRecordSetWriter/index.html">XMLRecordSetWriter</a><br/><a href="../../../nifi-parquet-nar/1.19.1/org.apache.nifi.parquet.ParquetRecordSetWriter/index.html">ParquetRecordSetWriter</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.json.JsonRecordSetWriter/index.html">JsonRecordSetWriter</a><br/><a href="../../../nifi-record-serialization-services-nar/1.19.1/org.apache.nifi.lookup.RecordSetWriterLookup/index.html">RecordSetWriterLookup</a></td><td id="description">The record writer to use to write the result sets.</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"><strong>Schema Name</strong></td><td>mongodb-schema-name</td><td id="default-value">${schema.name}</td><td id="allowable-values"></td><td id="description">The name of the schema in the configured schema registry to use for the query results.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Query Output Attribute</td><td>mongo-query-attribute</td><td></td><td id="allowable-values"></td><td id="description">If set, the query will be written to a specified attribute on the output flowfiles.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Query</td><td>Query</td><td></td><td id="allowable-values"></td><td id="description">The selection criteria to do the lookup. If the field is left blank, it will look for input from an incoming connection from another processor to provide the query as a valid JSON document inside of the FlowFile's body. If this field is left blank and a timer is enabled instead of an incoming connection, that will result in a full collection fetch using a "{}" query.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Projection</td><td>Projection</td><td></td><td id="allowable-values"></td><td id="description">The fields to be returned from the documents in the result set; must be a valid BSON document<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Sort</td><td>Sort</td><td></td><td id="allowable-values"></td><td id="description">The fields by which to sort; must be a valid BSON document<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Limit</td><td>Limit</td><td></td><td id="allowable-values"></td><td id="description">The maximum number of elements to return<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Batch Size</td><td>Batch Size</td><td></td><td id="allowable-values"></td><td id="description">The number of elements to be returned from the server in one batch<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</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 have the results of a successful query execution go here.</td></tr><tr><td>failure</td><td>All input FlowFiles that are part of a failed query execution go here.</td></tr><tr><td>original</td><td>All input FlowFiles that are part of a successful query execution go here.</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>mongo.database.name</td><td>The database where the results came from.</td></tr><tr><td>mongo.collection.name</td><td>The collection where the results came from.</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component allows an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>