• User Manuals »
  • Denodo Templates for Twitter - Quick Use Guide

Denodo Templates for Twitter - Quick Use Guide

Overview

Twitter is a social networking site that relies on micro-blogging for communication. By typing short, 140 character messages (up to 280 since 2017) users can communicate with their followers and get information spread around. Since its inception, Twitter has grown and turned into a massive site used by mainstream media as well as average individuals to communicate about important issues, random issues, or just about what they’re doing at any time. It allows people to blog in short bursts, a practice also known as microblogging.

Twitter lets you make short posts about anything. These short posts are known as “tweets”, in reference to the chirping of birds, and appear chronologically on your Twitter profile page. In addition to posting, you can also follow others on Twitter to get their latest tweets in your Twitter feed. Conversely, if someone follows you, they get your tweets in their feeds.

Denodo Templates for Twitter

Importing the Denodo Templates for Twitter will grant you the access to the following functionalities, grouped by types:

  • Direct Messages
  • Direct Messages Events List
  • Lists
  • Lists List
  • Membership Lists
  • Ownership Lists
  • Tweets
  • Favorites List
  • Search Tweets
  • Home Timeline
  • Mentions Timeline
  • User Timeline
  • Retweets of Me
  • Users
  • Blocks List
  • Followers List
  • Friends List
  • Mutes Users List
  • Utils
  • Application Rate Limit Status

The templates are organized as described above. In each folder you’ll find the views provided for all this functionalities and two subfolders, one for the data sources and another one for the base views, which are more complex and will contain more info than the final views (and might be needed in some specific scenarios).

In the Configuration section you’ll find how to generate your own Denodo Templates for Twitter.

Requirements

The Denodo Templates for Twitter require:

  • When used with Denodo 6.0: At least the Denodo update 20181120

Configuration

Get OAuth1 credentials

In order to get the parameters needed to authenticate to your Twitter account from Denodo, you need to follow these steps:

  1. You must have a Developer Account in order to authenticate to the Twitter API. Navigate through https://developer.twitter.com/en/apps/ and select the Application that you wish to configure with Denodo by clicking in the Details button.

  1. Now you have to go to the Keys and Tokens section. Those keys are what you need to get your templates working into Denodo with your Twitter App. Also, make sure that you have Read, write, and direct messages permissions, otherwise configure them in the Permissions tab.


 

Now, you have all the data needed to configure the .properties file.

Configure denodo_templates_twitter.properties file

Before importing the VQL templates in Denodo, you have to set the following parameters defined in the denodo_templates_twitter.properties file:

  • api_standard_version: the version you want to use of the Twitter API. By default, it’s set to v1.1.

  • client_id: Matches API key, obtained in the step 2 of the “Get OAuth1 credentials” section.

  • client_shared_secret: Matches API secret key, obtained in the step 2 of the “Get OAuth1 credentials” section.

  • access_token: Matches Access token, obtained in the step 2 of the “Get OAuth1 credentials” section.

  • access_token_secret: Matches Access token secret, obtained in the step 2 of the “Get OAuth1 credentials” section.

  • api_search_url: For the search functionality Twitter provides Standard, Enterprise and Premium APIs, so you can set this parameter using one of them. By default, this parameter is set to use Standard API.

twitter_templates_denodo.properties

Note: Make sure you leave an empty line at the end of the properties file.

Import the VQL file into Denodo

Once you have completed all the previous steps of this configuration section, you finally can load the denodo_templates_twitter.vql file into Denodo. You only have to import it, along with the .properties file, using the Import option of the VDP Administration Tool:

Refresh

After the import process finishes, refresh the Server Explorer by selecting File → Refresh and you will be able to see the data source and base views for accessing to Denodo Templates for Twitter:

        Denodo for Twitter views and folders structure


Query

Now, you can execute queries over the Twitter views that have been created.

Limitations

Twitter API Limits

The standard API rate limits are described in the table in this link. Note that endpoints not listed in the chart default to 15 requests per allotted user. All request windows are 15 minutes in length. These rate limits apply to the standard API endpoints only, does not apply to premium APIs.

Denodo 6 doesn’t support pagination in JSON data sources

To be able to get more than the results limited by the Twitter API for each view, we can use pagination, a feature included in Denodo 7 but not available in Denodo 6.

This way, we can get the amount of desired data as long as we don’t reach Twitter API limits.