Modeling Guide

Tweet Stream

The Tweet Stream operator receives a stream of tweets filtered by some key words specified in the configuration using the Twitter Streaming API.

Using the Twitter Streaming APIInformation published on non-SAP site, it outputs each received tweet as a separate Data Pipeline message where its body contains the text of the tweet, and its header contains metadata about the tweet. To use the operator, you must have some keys and tokens to access the twitter API. For that, you need to create an application and navigate to the configuration of your application. Do not share the secret key and token with anyone. Notice that if you run multiple graphs with the same credentials the twitter api may block the stream in the latest graph due to rate limitingInformation published on non-SAP site.

Configuration Parameters

Parameter

Type

Description

filterWords string The key words used to filter the tweet stream. The field cannot be empty. Commas ',' can be used between the terms in the input string as an OR logic operator, and spaces can be used as the 'AND' operator.
language string Mandatory. Filter the tweet by the given language.

consumerKey

string

Mandatory. Your Twitter Application Consumer Key (API Key).

consumerSecret

string

Mandatory. Your Twitter Application Consumer Secret (API Secret).

accessToken

string

Mandatory. The token used to make API requests on behalf of your account.

accessTokenSecret

string

Mandatory. The secret token used to make API requests on behalf of your account.

Input

None

Output

Output

Type

Description

outTweet

message

A Data Pipeline message where the body contains the tweet text, and the header contain metadata about the tweet. The type fields in the metadata can be found at https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-objectInformation published on non-SAP site

outStatus

string

A status string that contain a status code returned by the twitter api.