- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to segericate the twitter json file based on #tag and store into different location Using NiFi?
- Labels:
-
Apache NiFi
Created 06-20-2016 10:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- I can able to receive the twitter files as Json format from my twitter account but
- i need to filter these files based on #tags (Ex, #fourseasondallas)
- stored in a separate directory
Created 06-20-2016 03:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like the Twitter API puts hash tags into the following JSON:
"entities": { "hashtags":[], "urls":[], "user_mentions":[] }
You could use EvaluteJsonPath to extract the value of the hashtags into FlowFile attributes, and then use RouteOnAttribute to route the ones matching your tag to a PutFile processor.
This blog shows an example of extracting values from the Twitter JSON and making routing decisions:
https://blogs.apache.org/nifi/entry/indexing_tweets_with_nifi_and
Created 06-20-2016 03:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like the Twitter API puts hash tags into the following JSON:
"entities": { "hashtags":[], "urls":[], "user_mentions":[] }
You could use EvaluteJsonPath to extract the value of the hashtags into FlowFile attributes, and then use RouteOnAttribute to route the ones matching your tag to a PutFile processor.
This blog shows an example of extracting values from the Twitter JSON and making routing decisions:
https://blogs.apache.org/nifi/entry/indexing_tweets_with_nifi_and
