Skip to main content
Skip table of contents

Connecting to Twitter via SQL

You can use SQL to connect to Twitter in the CData Virtuality Studio or the Code Editor in the Web UI.

Pre-requisites

  • You need the consumer key, consumer secret, OAuth token, access token secret.

How to Connect

Run the following statements in the CData Virtuality Studio or the Web UI (remember to enter your credentials):

SQL
CALL SYSADMIN.createConnection (
    name => 'twitter_src'
    ,jbossCLITemplateName => 'ws'
    ,connectionOrResourceAdapterProperties => 'EndPoint=https://ads-api.twitter.com/10'
);;
 
CALL SYSADMIN.createDataSource (
    name => 'twitter_src'
    ,translator => 'twitter'
    ,modelProperties => 'consumer_key=<consumer_key>,consumer_secret=<consumer_secret>,oauth_token=<oauth_token>,access_token_secret=<access_token_secret>,multitenancy_tablename=<multitenancy_tablename>'
    ,translatorProperties => ''
);;

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.