Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Nifi twitter term

avatar
Explorer

Hello,

 

I want to ask what is the proper way to define the terms in Gettwitter processor terms to filter.

I'm trying to retrieve tweets that include the word bt by just writing bt in terms to filter however i'm getting tweets that include the two letters bt in a word such as bt*** or ****bt or ***bt***.

 

Here is a screenshot of the processor 

pro.PNG

and this is a sample tweet retrieved by the processor 

 

Capture.PNG

 

 

I just need tweets with the two letters word bt. I tried to use single quote like 'bt' and double quote "bt" but i'm not getting any data

 

 

Thank you

1 ACCEPTED SOLUTION

avatar

Though many of these kind of fields allow regular expressions, the doc for this one does not mention it. 

 

I would try to use a regex, but probably it will not work because the field allows comma separated input. 

 

From here you would need to get creative. 

 

First of all you could definitely add a filter based on a regex afterwards (in Route text).

 

If this does not perform sufficiently you can perhaps try spaceBTspace but this is obviously a shortcut that will miss some results. (Also I did not test it).

 

In this particular case BT preceded or followed by a space may capture most cases.

 

---

So far the regular recommendations, if you really want to go all the way you could probably create your own get twitter, but I would start with the two step filter and see if it works for you. 


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

View solution in original post

2 REPLIES 2

avatar

Though many of these kind of fields allow regular expressions, the doc for this one does not mention it. 

 

I would try to use a regex, but probably it will not work because the field allows comma separated input. 

 

From here you would need to get creative. 

 

First of all you could definitely add a filter based on a regex afterwards (in Route text).

 

If this does not perform sufficiently you can perhaps try spaceBTspace but this is obviously a shortcut that will miss some results. (Also I did not test it).

 

In this particular case BT preceded or followed by a space may capture most cases.

 

---

So far the regular recommendations, if you really want to go all the way you could probably create your own get twitter, but I would start with the two step filter and see if it works for you. 


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

avatar
Explorer

I tried to use regex but it didn't work. 

 

Yes the space bt space did really work, I'm thinking to cover other cases by adding space bt & bt space in case they are at the beginning or end of sentence. 

 

 

Thank you for your help, really appreciate it!