Table of Contents

Search

  1. Preface
  2. Introduction to PowerExchange for Twitter
  3. PowerExchange for Twitter Configuration
  4. Twitter and Twitter Streaming Connections
  5. Twitter and Twitter Streaming Data Objects
  6. Twitter Mappings
  7. Datatype Reference

PowerExchange for Twitter User Guide

PowerExchange for Twitter User Guide

Twitter Mapping Example

Twitter Mapping Example

You work for an organization, HypoMarket Corporation. You need to review all the tweets that mention your product HypoBasket since the time you released the product in February 2012. You need to review the users IDs and the location of the tweets and verify that the product HypoBasket is a trending topic on Twitter.
Create a mapping that identifies tweets that contain the word HypoBasket, the User ID, and location of the tweets, and writes those records to a table.
You can use the following objects in a Twitter mapping:
Twitter input
The mapping source is a Twitter data object that contains the resource Search.
Create a physical data object and add the data object to the mapping. Add the Search resource to the physical data object. Change the query parameter with the following query:
QUERY=HypoBasket&since:2012-02-01
Sorter transformation
Optionally, sort the data based on the time stamp.
Add a Sorter transformation to the mapping. Specify the time stamp as the sort key with direction as ascending.
Mapping output
Add a flat file data object to the mapping as a target.
After you run the mapping, Data Integration Service writes the extracted tweets to the target table. You can use text analytics and sentiment analysis tools to analyze the tweets.
The following image shows the mapping example:

0 COMMENTS

We’d like to hear from you!