blob: d45492eb739b0a17f06015d975e8cea158663494 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>QuerySalesforceObject</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;">QuerySalesforceObject</h1><h2>Description: </h2><p>Retrieves records from a Salesforce sObject. Users can add arbitrary filter conditions by setting the 'Custom WHERE Condition' property. Supports incremental retrieval: users can define a field in the 'Age Field' property that will be used to determine when the record was created. When this property is set the processor will retrieve new records. It's also possible to define an initial cutoff value for the age, filtering out all older records even for the first run. This processor is intended to be run on the Primary Node only. FlowFile attribute 'record.count' indicates how many records were retrieved and written to the output.</p><p><a href="additionalDetails.html">Additional Details...</a></p><h3>Tags: </h3><p>salesforce, sobject, soql, query</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"><strong>URL</strong></td><td>salesforce-url</td><td></td><td id="allowable-values"></td><td id="description">The URL for the Salesforce REST API including the domain without additional path information, such as https://MyDomainName.my.salesforce.com<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>API Version</strong></td><td>salesforce-api-version</td><td id="default-value">54.0</td><td id="allowable-values"></td><td id="description">The version number of the Salesforce REST API appended to the URL after the services/data path. See Salesforce documentation for supported versions<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>sObject Name</strong></td><td>sobject-name</td><td></td><td id="allowable-values"></td><td id="description">The Salesforce sObject to be queried<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Field Names</strong></td><td>field-names</td><td></td><td id="allowable-values"></td><td id="description">Comma-separated list of field names requested from the sObject to be queried<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Read Timeout</strong></td><td>read-timeout</td><td id="default-value">15 s</td><td id="allowable-values"></td><td id="description">Maximum time allowed for reading a response from the Salesforce REST API<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>OAuth2 Access Token Provider</strong></td><td>oauth2-access-token-provider</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>OAuth2AccessTokenProvider<br/><strong>Implementation: </strong><a href="../../../nifi-oauth2-provider-nar/1.19.1/org.apache.nifi.oauth2.StandardOauth2AccessTokenProvider/index.html">StandardOauth2AccessTokenProvider</a></td><td id="description">Service providing OAuth2 Access Tokens for authenticating using the HTTP Authorization Header</td></tr><tr><td id="name"><strong>Record Writer</strong></td><td>record-writer</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">Service used for writing records returned from the Salesforce REST API</td></tr><tr><td id="name"><strong>Create Zero Record FlowFiles</strong></td><td>create-zero-record-files</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Specifies whether or not to create a FlowFile when the Salesforce REST API does not return any records</td></tr><tr><td id="name">Age Field</td><td>age-field</td><td></td><td id="allowable-values"></td><td id="description">The name of a TIMESTAMP field that will be used to filter records using a bounded time window.The processor will return only those records with a timestamp value newer than the timestamp recorded after the last processor run.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Initial Age Start Time</td><td>initial-age-filter</td><td></td><td id="allowable-values"></td><td id="description">This property specifies the start time that the processor applies when running the first query.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Age Field] Property has a value specified.</strong></td></tr><tr><td id="name">Age Delay</td><td>age-delay</td><td></td><td id="allowable-values"></td><td id="description">The ending timestamp of the time window will be adjusted earlier by the amount configured in this property. For example, with a property value of 10 seconds, an ending timestamp of 12:30:45 would be changed to 12:30:35.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Age Field] Property has a value specified.</strong></td></tr><tr><td id="name">Custom WHERE Condition</td><td>custom-where-condition</td><td></td><td id="allowable-values"></td><td id="description">A custom expression to be added in the WHERE clause of the query<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>For FlowFiles created as a result of a successful query.</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>mime.type</td><td>Sets the mime.type attribute to the MIME Type specified by the Record Writer.</td></tr><tr><td>record.count</td><td>Sets the number of records in the FlowFile.</td></tr></table><h3>State management: </h3><table id="stateful"><tr><th>Scope</th><th>Description</th></tr><tr><td>CLUSTER</td><td>When 'Age Field' is set, after performing a query the time of execution is stored. Subsequent queries will be augmented with an additional condition so that only records that are newer than the stored execution time (adjusted with the optional value of 'Age Delay') will be retrieved. State is stored across the cluster so that this Processor can be run on Primary Node only and if a new Primary Node is selected, the new node can pick up where the previous node left off, without duplicating the data.</td></tr></table><h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component does not allow an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>