One of my teenage daughters, somewhat of a Nobody in the social jungle that is high school, has become her school’s favourite comedian without actually talking to anybody because of Twitter. In this video by Tahir Hussain Babar of the SAP HANA Academy about Smart Data Integration we learn a little about how to use SAP HANA to harness some of that social media magic in SPS09.

Picture1.png

What’s Trending?

In this video you are going to be creating a remote data source to a virtual table which is connected to your Twitter adapter.  This means within a few minutes you can consume data from the Twitter API in real time into SAP HANA.  You’re going to be looking at creating a Twitter Remote Source based on the adapter SDK and then you’re going to switch on Twitter so you can start replicating data from a Twitter app via the API.

Previously on Twitter

In the previous video we registered an agent and configured an adapter.  We used the data provisioning agents to install an agent pointing to a SAP HANA server.  Next we switched on the ability to use the Twitter adapter by registering the service. We also made sure that the DP server was switched on.  You need all these things on in order to carry out these tasks.

Creating the Remote Source

You can now look at creating the Remote Source.  To do this go back to Provisioning, within Remote Sources you create your remote source to your Twitter adapter by following these steps.

Picture2.png

Picture3.png

Picture4.png

Creating an App

You will need these four pieces information, provided when you create your twitter developer account on dev.twitter.com.

  1. Consumer Key
  2. Consumer Secret
  3. Access Token
  4. Access Token Secret

Once logged into your developer account you can create an app by following these steps.

Picture5.png

Make sure you agree to the license.

Picture6.png

Copy these items from your developer account on twitter to your Remote Source.

  1. Consumer Key
  2. Consumer Secret

Picture7.png

Picture8.png

Scroll to the bottom as shown to generate you access tokens.

Picture9.png

Picture10.png

Date Format

A problem you may have with the date format on Twitter is a message relating to JSON invalid time zone.  This is caused by the time zone on your Twitter account. Changing the time zone resolves the issue.

Status Table

Once connected you should see two objects within the Remote Source.  The Rate_Limit_Status table isn’t really important.  However, the Status table contains all your tweets.

Picture11.png

Adding the Status Table as a Virtual Table to Facilitate Local Data Manipulation

This enables you to manipulate the Status table in your local schema.  Once this table has been created you can shut down your remote source and go back into your catalog.  You should have a table called Twitter status. This will show all your tweets.

Picture12.png

Next on Twitter


Bob concludes by telling the viewer that the next video will demonstrate how to show only your own tweets.

Conclusion


As a father I was obviously mildly concerned that people who didn’t know my daughter were laughing at such supposed gems as “School? More like let’s throw teenagers into a pit filled with spikes and snakes and call it Education”.  But alas such is the veritable minefield of social media. However, this seemingly absurd phenomenon is ‘just Twitter’ and I ‘need to get over it jeez’.  This does demonstrate that Twitter is a powerful tool in gaining popularity and publicity.  Is it just because teenagers’ parents are viewed by their offspring to be less mobile savvy and therefore less likely to interfere with their lives?  I hope so.

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Simon Hansen

    twitter.JPGHi Rafael,

    thanks for your video and description.

    May you can help me.

    I follwed your steps, but when i want to create the “Remote Source” and select the TwitterAdapter the Adapter is not assigned to the Source Location “Adapter” and i don’t get these two tables “Status” and “Rate_Limit_Status”.

    Thanks Simon

    (0) 

Leave a Reply