blob: ab967d9b08aacd412e692140c3f3eb1924b878dc [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>ConsumeTwitter</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;">ConsumeTwitter</h1><h2>Description: </h2><p>Streams tweets from Twitter's streaming API v2. The stream provides a sample stream or a search stream based on previously uploaded rules. This processor also provides a pass through for certain fields of the tweet to be returned as part of the response. See https://developer.twitter.com/en/docs/twitter-api/data-dictionary/introduction for more information regarding the Tweet object model.</p><h3>Tags: </h3><p>twitter, tweets, social media, status, 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.</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>Stream Endpoint</strong></td><td>stream-endpoint</td><td id="default-value">Sample Stream</td><td id="allowable-values"><ul><li>Sample Stream <img src="../../../../../html/images/iconInfo.png" alt="Streams about one percent of all Tweets. https://developer.twitter.com/en/docs/twitter-api/tweets/volume-streams/api-reference/get-tweets-sample-stream" title="Streams about one percent of all Tweets. https://developer.twitter.com/en/docs/twitter-api/tweets/volume-streams/api-reference/get-tweets-sample-stream"></img></li><li>Search Stream <img src="../../../../../html/images/iconInfo.png" alt="The search stream produces Tweets that match filtering rules configured on Twitter services. At least one well-formed filtering rule must be configured. https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream" title="The search stream produces Tweets that match filtering rules configured on Twitter services. At least one well-formed filtering rule must be configured. https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream"></img></li></ul></td><td id="description">The source from which the processor will consume Tweets.</td></tr><tr><td id="name"><strong>Base Path</strong></td><td>base-path</td><td id="default-value">https://api.twitter.com</td><td id="allowable-values"></td><td id="description">The base path that the processor will use for making HTTP requests. The default value should be sufficient for most use cases.</td></tr><tr><td id="name"><strong>Bearer Token</strong></td><td>bearer-token</td><td></td><td id="allowable-values"></td><td id="description">The Bearer Token provided by Twitter.<br/><strong>Sensitive Property: true</strong></td></tr><tr><td id="name"><strong>Queue Size</strong></td><td>queue-size</td><td id="default-value">10000</td><td id="allowable-values"></td><td id="description">Maximum size of internal queue for streamed messages</td></tr><tr><td id="name"><strong>Batch Size</strong></td><td>batch-size</td><td id="default-value">1000</td><td id="allowable-values"></td><td id="description">The maximum size of the number of Tweets to be written to a single FlowFile. Will write fewer Tweets based on the number available in the queue at the time of processor invocation.</td></tr><tr><td id="name"><strong>Backoff Attempts</strong></td><td>backoff-attempts</td><td id="default-value">5</td><td id="allowable-values"></td><td id="description">The number of reconnection tries the processor will attempt in the event of a disconnection of the stream for any reason, before throwing an exception. To start a stream after this exception occur and the connection is fixed, please stop and restart the processor. If the valueof this property is 0, then backoff will never occur and the processor will always need to be restartedif the stream fails.</td></tr><tr><td id="name"><strong>Backoff Time</strong></td><td>backoff-time</td><td id="default-value">1 mins</td><td id="allowable-values"></td><td id="description">The duration to backoff before requesting a new stream ifthe current one fails for any reason. Will increase by factor of 2 every time a restart fails</td></tr><tr><td id="name"><strong>Maximum Backoff Time</strong></td><td>maximum-backoff-time</td><td id="default-value">5 mins</td><td id="allowable-values"></td><td id="description">The maximum duration to backoff to start attempting a new stream.It is recommended that this number be much higher than the 'Backoff Time' property</td></tr><tr><td id="name"><strong>Connect Timeout</strong></td><td>connect-timeout</td><td id="default-value">10 secs</td><td id="allowable-values"></td><td id="description">The maximum time in which client should establish a connection with the Twitter API before a time out. Setting the value to 0 disables connection timeouts.</td></tr><tr><td id="name"><strong>Read Timeout</strong></td><td>read-timeout</td><td id="default-value">10 secs</td><td id="allowable-values"></td><td id="description">The maximum time of inactivity between receiving tweets from Twitter through the API before a timeout. Setting the value to 0 disables read timeouts.</td></tr><tr><td id="name"><strong>Backfill Minutes</strong></td><td>backfill-minutes</td><td id="default-value">0</td><td id="allowable-values"></td><td id="description">The number of minutes (up to 5 minutes) of streaming data to be requested after a disconnect. Only available for project with academic research access. See https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/recovery-and-redundancy-features</td></tr><tr><td id="name">Tweet Fields</td><td>tweet-fields</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of tweet fields to be returned as part of the tweet. Refer to https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet for proper usage. Possible field values include: attachments, author_id, context_annotations, conversation_id, created_at, entities, geo, id, in_reply_to_user_id, lang, non_public_metrics, organic_metrics, possibly_sensitive, promoted_metrics, public_metrics, referenced_tweets, reply_settings, source, text, withheld</td></tr><tr><td id="name">User Fields</td><td>user-fields</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of user fields to be returned as part of the tweet. Refer to https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user for proper usage. Possible field values include: created_at, description, entities, id, location, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, withheld</td></tr><tr><td id="name">Media Fields</td><td>media-fields</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of media fields to be returned as part of the tweet. Refer to https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/media for proper usage. Possible field values include: alt_text, duration_ms, height, media_key, non_public_metrics, organic_metrics, preview_image_url, promoted_metrics, public_metrics, type, url, width</td></tr><tr><td id="name">Poll Fields</td><td>poll-fields</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of poll fields to be returned as part of the tweet. Refer to https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll for proper usage. Possible field values include: duration_minutes, end_datetime, id, options, voting_status</td></tr><tr><td id="name">Place Fields</td><td>place-fields</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of place fields to be returned as part of the tweet. Refer to https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/place for proper usage. Possible field values include: contained_within, country, country_code, full_name, geo, id, name, place_type</td></tr><tr><td id="name">Expansions</td><td>expansions</td><td></td><td id="allowable-values"></td><td id="description">A comma-separated list of expansions for objects in the returned tweet. See https://developer.twitter.com/en/docs/twitter-api/expansions for proper usage. Possible field values include: author_id, referenced_tweets.id, referenced_tweets.id.author_id, entities.mentions.username, attachments.poll_ids, attachments.media_keys ,in_reply_to_user_id, geo.place_id</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>FlowFiles containing an array of one or more Tweets</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>The MIME Type set to application/json</td></tr><tr><td>tweets</td><td>The number of Tweets in the FlowFile</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 does not allow an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>