Twitter Search Trends Task
Twitter Search Trends Task returns a list of top 50 trending topics for a given Where On Earth Identify (WOEID).
Configuring Twitter Search Trends Task
Similarly to adding other SQL Server Integration Services (SSIS) tasks, the Twitter Search Trends Task shown in Figure 1 can be added into the Control Flow pane in the following manner;
- Drag-and-drop the Twitter Search Trends Task into the Control Flow, or
- Double clicking the Twitter Search Trends Task
By default the Twitter Search Trends Task will throw validation errors shown in Figure 2.
To resolve the validation errors, we need to configure the Twitter Search Trends Task by using its editor (Twitter Search Trends Task Editor).
The Twitter Search Trends Task has three patameters, Where On Earth Identify (WOEID), Save To path as well as the Save As type which can either be JSON of TEXT file – by default, the results will be saved as TEXT file.
Set Absolute Values
Providing absolute values for the two parameters refers to hardcoding the values into the two textboxes i.e. manually enter the WOEID. There are several websites that provide a lookup for WOEID, for instance I used http://woeid.rosselliot.co.nz/ to get WOEID for South Africa as shown in Figures 4 and 5.
The WOEID I found in Figure 5 is now manually entered as shown in Figure 6.
Dynamically Set Values using Expressions
Instead of manually capturing values for the parameters, we can dynamically set them using package expressions. Expressions reads data from package variables at runtime. To configure expressions, click the Ex button. This will open up a Choose Variable dialog box. You can then select the variable you want to use and click the OK button.
Once you have clicked the OK button, you will be redirected back to the Twitter Search Trends Task with textboxes set to variable names.
Executing Twitter Search Trends Task
The execution of the Twitter Search Trends Task is usually quick. Similarly to executing other SSIS tasks, the simplest way of executing Twitter Search Trends Task is to right-click your mouse button, navigate to and click Execute Task option as shown in Figure 9.
If the configuration is done correctly, the Twitter Search Trends Task execution should be successful as shown in Figure 10.
Additional Informational Events
As the Twitter Search Trends Task is being executed, it is important to take notes of two additional information events that will appear in the Execution Results tab in the designer. As indicated in Figure 11, these two informational events basically describe the parameter values that are being used in during task execution. This information could be useful during troubleshooting, especially in cases where Expressions are used to set parameter values.