Twitter Search User Task

Description

Twitter Search User Task extracts a list of Twitter handlers based on a given query text. The returned list also retrieves name and description of a given Twitter handler.

Tutorial

Configuring Twitter Search User Task

Similarly to adding other SQL Server Integration Services (SSIS) tasks, the Twitter Search User Task shown in Figure 1 can be added into the Control Flow pane in the following manner;

  1. Drag-and-drop the Twitter Search User Task into the Control Flow, or
  2. Double clicking the Twitter Search User Task
Twitter Search User Task - SSIS Toolbox

Figure 1

By default the Twitter Search User Task will throw validation errors shown in Figure 2. Validation errors will prevent you from successfully executing theTwitter Search User Task.

Twitter Search User Task - Validation Error

Figure 2

To resolve validation errors, we need to configure the Twitter Search User Task by using its editor (Twitter Search User Task Editor).

Twitter Search User Task Editor

The Twitter Search User Task has five parameters:

  1. Search Query – tweet text to search for. It has a maximum character value of 500 and default value is trevornoah
  2. Count – Number of tweets to return. The maximum value is 100 and the default value is 5
  3. Page – Specifies the page of results to retrieve, by default the value is set to 1
  4. Save To – path wherein the generated file will be stored
  5. Save As – 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 parameters refers to hardcoding the values into the textboxes i.e. manually enterĀ  Microsoft as the user you want to look for.

Twitter Search User Task - Absolute Values

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.

Twitter Search User Task - Choose Variable

Once you have clicked the OK button, you will be redirected back to the Twitter Search User Task with textboxe (in this case the Count parameter textbox) set to variable name.

Twitter Search User Task - Expressions

Executing Twitter Search User Task

The execution of the Twitter Search User Task is usually quick. Similarly to executing other SSIS tasks, the simplest way of executing Twitter Search User Task is to right-click your mouse button, navigate to and click Execute Task option as shown in Figure 7.

Twitter Search User Task - Execute Task

Figure 7

If the configuration is done correctly, the Twitter Search User Task execution should be successful as shown in Figure 8.

Twitter Search User Task - Execution

Figure 8

The file generated after executing the Twitter Search User Task is shown in Figure 9 and it is prefixed with SST_TwitSearchUser_ followed by a date and time stamp.

Twitter Search User Task - Output File

Figure 9

Additional information

Additional Informational Events

As the Twitter Search User 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 10, 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.

Twitter Search User Task - Informational Events

Figure 10