Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Twitter Filter Rules

...

ProcessContext encrypt and decrypt methods

Component

org.apache.nifi.processor.ProcessContext

Bundle Grouporg.apache.nifi
Bundle Artifactnifi-api
Deprecation TypeInterface Method
Deprecated Version1.20.0
Migration DifficultyHIGH
Migration TypeImplementation redesign

Migration

The ProcessContext interface provides property and component configuration information to Processors through the onTrigger method. The encrypt and decrypt methods supported enciphering and deciphering component-provided strings using the Sensitive Properties Key and Sensitive Properties Algorithm configured in nifi.properties.

...

Configuring ConsumeTwitter with the Search Stream setting requires creating Filter Rules using the Twitter REST API outside of processor properties.

Twitter Filter Rules

Twitter Filter Rules can be created using JSON sent as an HTTP POST to the Twitter REST API Version 2.

  • https://api.twitter.com/2/tweets/search/stream/rules

The Languages property in GetTwitter can be applied to a Filter Rule using the lang operator in a Filter value definition.

{
  "add": [
    {
     "value": "Apache lang:en",
     "tag": "English Language Filter"
    }
  ]
}

The Terms to Filter On property in GetTwitter can be applied to a Filter Rule using the Filter value definition with optional Boolean operators.

{
  "add": [
    {
     "value": "Apache AND NiFi",
     "tag": "Boolean Terms Filter"
    }
  ]
}

The IDs to Filter On property in GetTwitter can be applied to a Filter Rule using the from operator in a Filter value definition.

{
  "add": [
    {
     "value": "from:1625695877326340102",
     "tag": "Twitter User ID Filter"
    }
  ]
}

Flow Definitions

The Deprecated Flow Definition includes GetTwitter configured with the Sample Endpoint and without filters.

...