CData Cloud offers access to Twitter across several standard services and protocols, in a cloud-hosted solution. Any application that can connect to a MySQL or SQL Server database can connect to Twitter through CData Cloud.
CData Cloud allows you to standardize and configure connections to Twitter as though it were any other OData endpoint, or standard SQL Server/MySQL database.
This page provides a guide to Establishing a Connection to Twitter in CData Cloud, as well as information on the available resources, and a reference to the available connection properties.
Establishing a Connection shows how to authenticate to Twitter and configure any necessary connection properties to create a database in CData Cloud
Accessing data from Twitter through the available standard services and CData Cloud administration is documented in further details in the CData Cloud Documentation.
Connect to Twitter by selecting the corresponding icon in the Database tab. Required properties are listed under Settings. The Advanced tab lists connection properties that are not typically required.
First, generate a bearer token from Twitter's website. The YourBearerToken value is generated from: Twitter's Developer Portal > ProjectOfInterest > Keys and Tokens. For more information, see the Twitter Developers Portal Documentation.
After generating the token and setting the following, you are ready to connect:
If you want to access any other tables and views (besides StreamRules and TweetStream), follow the OAuth 1.1 procedures described below.
By default, the Cloud attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.
To specify another certificate, see the SSLServerCert property for the available formats to do so.
To connect through the Windows system proxy, you do not need to set any additional connection properties. To connect to other proxies, set ProxyAutoDetect to false.
In addition, to authenticate to an HTTP proxy, set ProxyAuthScheme, ProxyUser, and ProxyPassword, in addition to ProxyServer and ProxyPort.
Set the following properties:
The CData Cloud models Twitter entities in relational Tables, Views, and Stored Procedures.
API limitations and requirements are documented in this section; you can use the SupportEnhancedSQL feature, set by default, to circumvent most of these limitations.
Tables describes the available tables.
Views are tables that cannot be modified. Typically, data that are read-only and cannot be updated are shown as views.
Stored Procedures are function-like interfaces to the data source. They can be used to search, update, and modify information in the data source.
The Cloud models the data in Twitter as a list of tables in a relational database that can be queried using standard SQL statements.
Name | Description |
DirectMessages | Send direct messages and query messages sent and received by the authenticated user. |
Favorites | Create, delete, and query a list of favorite tweets of the authenticated user and allow the user to favorite new tweets or remove existing favorites. |
Following | Create, delete, and query a list of users that the current Twitter account is following, otherwise known as friends. |
StreamRules | Query, add or delete rules to your stream. After you have added rules to your stream, you can retrieve all of the Tweets that match by querying the TweetStream view. |
Tweets | Create, delete, and query status updates and tweets from the authenticated user. |
Send direct messages and query messages sent and received by the authenticated user.
Direct messages that have been sent and received by the authenticated user will appear in DirectMessages.
The Min_Id and Max_Id pseudo columns may be used to narrow down a range of direct messages to return, or to return only recent direct messages. The Id may be specified to return a specific direct message.
New direct messages may be sent by performing an insert. Note that only Text and the Recipient_Id may be specified in an insert. In order to attach a media to the message, simply specify the media file paths MediaFilePath or the MediaId for the media file in the INSERT command.It is possible to attach only one media to a message. For example:
INSERT INTO DirectMessages (Recipient_Id, Text, MediaFilePath) VALUES ('0000000000000000000', 'Hello World', 'C:\\myFile.jpg')
INSERT INTO DirectMessages (Recipient_Id, Text, MediaId) VALUES ('1001073178217713668', 'Hello World', '1001072801250529280')
The UPDATE operation is not available on this table.
Direct messages may be deleted by using the DELETE operation.
Name | Type | ReadOnly | Description |
ID [KEY] | String | True |
The Id of the direct message. |
Created_At | Datetime | True |
When the direct message was made. |
Text | String | True |
The text of the direct message. |
Sender_Id | String | True |
The Id for the sender of the message. |
Source_App_Id | String | True |
The name for the sender of the message. |
Recipient_ID | String | True |
The Id for the recipient of the message. |
User_Mentions | String | True |
Mentions of other users in the tweet, returned as an XML aggregate. |
URLs | String | True |
URLs in the tweet, returned as an XML aggregate. |
Hashtags | String | True |
Hashtags in the tweet, returned as an XML aggregate. |
Attachment_Id | String | True |
Identifier of the media attached to the message. |
Attachment_Url | String | True |
Url of the media attached to the message. |
Attachment_Type | String | True |
Type of media attached to the message. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String |
An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Min_ID | String |
Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only direct messages that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id column must be a valid number but does not need to be a valid direct message Id. |
Max_ID | String |
Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only direct messages that are equal to or older than the creation date of the specified Id will be returned. The Max_Id column must be a valid number but does not need to be a valid direct message Id. |
MediaId | String |
The media Ids to associate with the tweet. |
MediaFilePath | String |
The media file path to associate with the tweet. |
Include_Entities | Boolean |
Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response. The default value is false. |
Create, delete, and query a list of favorite tweets of the authenticated user and allow the user to favorite new tweets or remove existing favorites.
The authenticated user's favorites may be viewed from Favorites.
The Min_Id and Max_Id pseudo columns may be used to narrow down a range of tweets to return, or to return only recent tweets. Additionally, the Include_Entities pseudo column may be specified, which can reduce the size of the response if it is set to false.
New tweets may be favorited by performing an insert and specifying the Id of the tweet.
The UPDATE operation is not available on this table.
Favorites may be removed by performing a DELETE operation and specifying the Id of the tweet to remove from Favorites.
Name | Type | ReadOnly | Description |
ID [KEY] | String | False |
The Id of the status update or tweet. Set this value when inserting to retweet an existing tweet. |
IDLong | Long | False |
The long type Id of the status update or tweet. |
Created_At | Datetime | True |
When the tweet was made. |
Text | String | False |
The text of the tweet. |
Source | String | True |
Source of the tweet. |
Favorited | Boolean | True |
Boolean indicating if this tweet has been favorited. |
Retweet_Count | Integer | True |
The number of times the tweet has been retweeted. |
From_User_Id | String | True |
Id of the user who made the tweet. |
From_User | String | True |
Screen name of the user who made the tweet. |
From_User_Name | String | True |
Name of the user who made the tweet. |
From_User_Lang | String | True |
Language code the from user is using. |
From_User_Profile_URL | String | True |
URL to the user who made the tweet. |
From_User_Profile_Image_URL | String | True |
URL to the profile image for the from user. |
From_User_Location | String | True |
The location of the user. |
To_User_Id | String | True |
Id of the user whom the tweet was sent to. |
To_User_Screen_Name | String | True |
Screen name of the user whom the tweet was sent to. |
User_Mentions | String | True |
Mentions of other users in the tweet, returned as an XML aggregate. |
URLs | String | True |
URLs in the tweet, returned as an XML aggregate. |
Hashtags | String | True |
Hashtags in the tweet, returned as an XML aggregate. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String |
An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Min_ID | String |
Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id must be a valid number but does not need to be a valid tweet Id. |
Max_ID | String |
Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or older than the creation date of the specified Id will be returned. The Max_Id must be a valid number but does not need to be a valid tweet Id. |
Include_Entities | Boolean |
Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response. The default value is false. |
Create, delete, and query a list of users that the current Twitter account is following, otherwise known as friends.
Users whom the authenticated user is following will appear here. Additionally, users whom a specified user is following may be viewed from Following.
By default, Following will return users whom the authenticated user is following. By specifying a Following_User_Id or Following_Screen_Name, users whom the specified user is following will be returned.
LookUpUsers refers to looking up additional information on the users returned from Twitter. Normally, only the Ids of users someone is following are returned from Twitter. If LookUpUsers is set to true, additional queries will be made to Twitter to retrieve user details, such as a Screen_Name. LookUpUsers is true by default.
MaxUserLookup refers to the maximum number of users to additionally look up information on. A maximum of 100 user details may be returned from Twitter per request. Setting this value higher will cause details for more users to be returned, but at the cost of additional requests. MaxUserLookup defaults to 100.
The authenticated user may follow another user by performing an insert based on either the User_Id or the Screen_Name.
The UPDATE operation is not available on this table.
The authenticated user may stop following another user by performing a delete based on the Id.
Name | Type | ReadOnly | Description |
ID [KEY] | String | False |
The Id of the user. |
Name | String | True |
The name of the user. |
User_Id | String | False |
The Id of the user. |
Screen_Name | String | False |
The screen name of the user. |
Following_User_Id | String | False |
Use this in the WHERE clause to retrieve the users a specific user is following other than the authenticated user. |
Following_Screen_Name | String | False |
Use this in the WHERE clause to retrieve the users a specific user is following other than the authenticated user. |
Location | String | True |
The location of the user. |
Profile_URL | String | True |
The URL for the user's profile. |
Profile_Image_URL | String | True |
The URL for the image of the user. |
Protected | Boolean | True |
The privacy flag of the user. If true, then the user's account is private and only their approved followers can read their tweets or see extended information about them. |
Lang | String | True |
The ISO language code of the user. |
Created_At | Datetime | True |
When the user account was created. |
Friends_Count | Integer | True |
The number of people this user is following. |
Followers_Count | Integer | True |
The number of followers the user has. |
Favourites_Count | Integer | True |
The number of favorites the user has. |
Statuses_Count | Integer | True |
The number of status updates or tweets the user has made. |
UTC_Offset | Integer | True |
The Coordinated Universal Time offset for the user in seconds. |
Time_Zone | String | True |
The time zone of the user. |
Notifications | Boolean | True |
Boolean indicating if the user has notifications enabled. |
Geo_Enabled | Boolean | True |
Boolean indicating if the user has geo-enabled turned on in their profile. |
Verified | Boolean | True |
Boolean indicating if the user account has been verified. |
Following | Boolean | True |
Boolean indicating if the user is following you. |
Contributors_Enabled | Boolean | True |
Boolean indicating if contributors are enabled for the account. Typically used in multiuser accounts. |
Follow_Request_Sent | Boolean | True |
If the user is a protected user, this column indicates if the authenticated user has sent a request to follow them. |
Listed_Count | Integer | True |
The number of public lists a user is listed in. -1 if unknown. |
Is_Translator | Boolean | True |
Boolean indicating if the user contributes to translating Twitter in other languages. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String |
An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
LookUpUsers | String |
A boolean indicating if you would like to additionally look up details about the user Ids returned. Normally only Ids will be returned from Twitter, but additional requests can be made to Twitter to retrieve user details. The default value is true. |
MaxUserLookup | String |
The maximum number of users to perform a lookup on. Each user lookup is limited to a maximum of 100 Ids per request. The default value is 100. |
Query, add or delete rules to your stream. After you have added rules to your stream, you can retrieve all of the Tweets that match by querying the TweetStream view.
Name | Type | ReadOnly | Description |
Id [KEY] | String | False |
Unique identifier of this rule. |
Value | String | False |
The rule text as submitted when creating the rule. |
Tag | String | False |
The tag label as defined when creating the rule. |
Create, delete, and query status updates and tweets from the authenticated user.
Tweets posted on Twitter will appear here. Tweets may come from the authenticated user's home page, they may be searched for, or they may come from a specific user or list. Note that some columns will always be null unless the SearchTerms pseudo column is specified.
By default, Tweets will return tweets from the authenticated user's home page. By specifying SearchTerms, tweets that match the terms used in the search will return. Valid search terms may be found under the topic "Standard Search Operators", located here: https://developer.twitter.com/en/docs/tweets/search/guides/standard-operators.
Note:SearchTerms may not be used with Screen_Name, User_Id, List_Id, Slug, Owner_User_Id, or Owner_Screen_Name.
The Screen_Name and User_Id pseudo columns can be used to return tweets made by the specified user. Alternatively, use the From_User_Name and From_User_Id columns to do the same thing.
The List_Id pseudo column may be specified to return tweets made in a specific list. Alternatively, the list may be specified using the Slug and either Owner_User_Id or Owner_Screen_Name.
The Min_Id and Max_Id pseudo columns may be used to narrow down a range of tweets to return, or to return only recent tweets. Ids are created in increasing numerical order on Twitter. Specifying a Min_Id returns only results with a greater Id or tweets that were created more recently than the specified one. Setting a Max_Id will return only tweets that are older than the creation date of the specified Id. Note that while these values must be valid, non-negative numbers, they do not have to be Ids that exist.
By default, Twitter only supports returning Tweets from searches that are up to 7 days old. However, customers with premium accounts may retrieve tweets older than this by executing either a 30-day or full archive search.
The EnvType and DevEnvironment pseudo columns may be used to query Premium Search APIs. EnvType specifies the environment type. It can take one of 30day or fullarchive values. The default value is 30day. The DevEnvironment is required in order to query the Premium Search API and must be set to the value of the dev environment label, created in your Twitter Developer Account. You should use a Premium or Enterprise app in your OAuth connection properties to use the feature. A SearchTerms value must be specified in order to use this feature.
In order to insert a tweet, simply specify the text of the tweet in the INSERT command. For example:
INSERT INTO Tweets (Text) VALUES ('Hello World')
In order to insert a tweet with media, specify the text of the tweet and the media file paths MediaFilePath for every media file in the INSERT command.You may include up to 4 photos or 1 animated GIF or 1 video in a Tweet. For example:
INSERT INTO Tweets (Text, MediaFilePath) VALUES ('Hello World', 'C:\\myfile.jpg,C:\\myfile2.jpg')
If you already have media ids you can insert them in a tweet by providing media ids MediaId of every media, in INSERT command. For example:
INSERT INTO Tweets (Text, MediaId) VALUES ('Hello World', '123456789,123456789')
In order to retweet an existing tweet, specify the Id column when inserting the tweet. For example:
INSERT INTO Tweets (Id) VALUES ('123456789')
Name | Type | ReadOnly | Description |
ID [KEY] | String | False |
The Id of the status update or tweet. Set this value when inserting to retweet an existing tweet. |
IDLong | String | False |
The long type Id of the status update or tweet. |
SearchTerms | String | False |
The SearchTerms to search against. This cannot be used with the Screen_Name or User_Id inputs. For more information on using the advanced query operators, see the Twitter API documentation here: https://dev.twitter.com/docs/using-search. Roughly 1500 results can be returned using the SearchTerms. |
Created_At | Datetime | True |
When the tweet was made. |
Text | String | False |
The text of the tweet. |
Lang | String | True |
Language code the tweet was made in. |
Source | String | True |
Source of the tweet. |
Favorited | Boolean | True |
Boolean indicating if this tweet has been favorited. |
Favorite_Count | Integer | True |
The approximate number of times this tweet has been favorited. |
Retweeted | Boolean | True |
Boolean indicating if this tweet has been retweeted. |
Retweet_Count | Integer | True |
The number of times the tweet has been retweeted. |
Retweeted_Status_Id | String | True |
Id of the tweet which was retweeted by this one. Empty if the current tweet is not a retweet. |
Truncated | Boolean | True |
Boolean indicating if this tweet has been truncated. |
Filter_Level | String | True |
Indicates the maximum value of the Filter_Level parameter that can be used and still stream this tweet. |
Possibly_Sensitive | String | True |
This field is available only when a tweet contains a link. The meaning of the field does not pertain to the tweet content itself, but instead it is an indicator that the URL contained in the tweet may contain content or media identified as sensitive content. |
Withheld_Copyright | Boolean | True |
When present and set to true, indicates that this piece of content has been withheld due to a DMCA complaint. |
Withheld_Scope | String | True |
When present, indicates whether the content being withheld is the status or a user. |
Withheld_In_Countries | String | True |
A list of uppercase, two-letter country codes this content is withheld from. |
Contributors | String | True |
An XML collection of user objects (usually only one) indicating users who contributed to the authorship of the tweet, on behalf of the official tweet author. |
Coordinates_Coordinates | String | True |
The geographic coordinates of this tweet (longitude first, then latitude). |
Coordinates_Type | String | True |
The type of coordinate, if applicable. |
Place_Full_Name | String | True |
The full name of the location of this tweet (city and state). |
Place_Country | String | True |
The country of origin of this tweet. |
Current_User_Retweet_Id | String | True |
Details the tweet Id of the authenticated user's own retweet (if it exists) of this tweet. |
Scopes | String | True |
A set of key-value pairs indicating the intended contextual delivery of the containing tweet. Currently used by Twitter's promoted products. |
In_Reply_To_Status_Id | String | True |
Represents the Id of the original status if this tweet is in reply to another. |
From_User_Id | String | True |
Id of the user who made the tweet. Use this in the WHERE clause to get tweets for the specified user. |
From_User_Screen_Name | String | True |
Screen name of the user who made the tweet. Use this in the WHERE clause to get tweets for the specified user. |
From_User_Name | String | True |
Name of the user who made the tweet. |
From_User_Location | String | True |
Location of the user who made the tweet. |
From_User_Profile_URL | String | True |
URL to the user who made the tweet. This is not returned when a SearchTerms is specified. |
From_User_Profile_Image_Url | String | True |
URL to the profile image for the from user. |
To_User_Id | String | True |
Id of the user who made the tweet. Use this in the WHERE clause to get tweets for the specified user. |
To_User_Screen_Name | String | True |
Screen name of the user who made the tweet. |
User_Mentions | String | True |
Mentions of other users in the tweet, returned as an XML aggregate. |
URLs | String | True |
URLs in the tweet, returned as an XML aggregate. If SearchTerms is specified, set Include_Entities=true to retrieve URLs. |
Hashtags | String | True |
Hashtags in the tweet, returned as an XML aggregate. If SearchTerms is specified, set Include_Entities=true to retrieve Hashtags. |
Media | String | True |
Media in the tweet, returned as an XML aggregate. If SearchTerms is specified, set Include_Entities=true to retrieve Media. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String |
An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Min_ID | String |
Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id must be a valid number but does not need to be a valid tweet Id. |
Max_ID | String |
Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or older than the creation date of the specified Id will be returned. The Max_Id must be a valid number but does not need to be a valid tweet Id. |
Include_Entities | Boolean |
Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response. The default value is false. |
Include_Retweets | Boolean |
Boolean indicating whether or not to include retweets in the result set. Only useful when no filters are specified (listing own tweets), From_User_Id, From_User_Screen_Name are specified (listing a user's tweets) or when List_Id is specified (listing the tweets from a list of User ids). Has no effect when used with SearchTerms. By default twitter includes retweets. The default value is true. |
Result_Type | String |
Indicates the type of results to return when using a SearchTerms. Currently Twitter has only popular and recent results. The allowed values are popular, recent. |
List_Id | String |
Used to specify the list Id to retrieve tweets from. This value does not work with SearchTerms, Screen_Name, or User_Id. |
Slug | String |
Alternative method of specifying a list. Use this in with an Owner_User_Id and Owner_Screen_Name to specify a list without a List_Id. |
Owner_User_Id | String |
Alternative method of specifying a list. Use this with a Slug to specify a list without the list Id. |
Owner_Screen_Name | String |
Alternative method of specifying a list. Use this with a Slug to specify a list without the List_Id. |
Geocode | String |
If this parameter is used with a SearchTerms, the query will return tweets from the specified geographical location. The geocode is specified in this manner: Lat,Long,Radius. For example: 37.781157,-122.398720,25mi |
RetweetId | String |
When making a new tweet, specify this value to retweet the specified tweet. |
MediaId | String |
A comma-separated value of media Ids to associate with the tweet. You may include up to 4 photos or 1 animated GIF or 1 video in a tweet. |
MediaFilePath | String |
A comma-separated value of media file paths to associate with the tweet. You may include up to 4 photos or 1 animated GIF or 1 video in a tweet. |
EnvType | String |
The environment type you want to use. The allowed values are 30day, fullarchive. The default value is 30day. |
DevEnvironment | String |
To begin using the new Premium APIs, you need to setup one or more dev environments for the endpoint and connect it to an app. |
Views are similar to tables in the way that data is represented; however, views are read-only.
Queries can be executed against a view as if it were a normal table.
Name | Description |
AccountSettings | Query account settings about the currently authenticated user. |
Followers | Query a list of users following the current Twitter account. |
ListMembers | Query the members of a specified list. |
Lists | Query Twitter list information based on a set of criteria. |
ListSubscribers | Query the subscribers to a specified list. |
Mentions | Query the most recent mentions (tweet containing @username) for the authenticating user. |
Retweets | Query a list of retweets of the authenticated user. |
Trends | Query the daily trending topics from Twitter. |
TweetStream | Query public data flowing through Twitter. |
Users | Query a list of users based on the SearchTerms, Id, or Screen_Name. |
Query account settings about the currently authenticated user.
Name | Type | Description |
Screen_Name [KEY] | String | The screen name of the currently authenticated user. |
Always_Use_Https | Boolean | A boolean indicating if the user has specified in their user settings to always use HTTPS URLs. |
Discoverable_By_Email | Boolean | A boolean indicating if the user can be found by email. This can be enabled in the 'let others find me by my email address' check box. |
Discoverable_By_Mobile | Boolean | A boolean indicating if the user can be found by their mobile number. |
Geo_Enabled | Boolean | A boolean indicating if the user has enabled adding locations to their tweets. |
Language | String | The default language code for the user. For example: en. |
Protected | Boolean | A boolean indicating if the user has selected the Protect My Tweets setting. |
Show_All_Inline_Media | Boolean | A boolean indicating if the user has enabled all media to be displayed in tweets. |
Sleep_Time_Enabled | Boolean | A boolean indicating if the user has selected to turn off updates during certain hours if they have added a mobile phone to their account. |
Sleep_Time_Start_Time | String | The start time for the range when Twitter updates will not be submitted to the user's mobile phone. |
Sleep_Time_End_Time | String | An ending time for the range when Twitter updates will not be submitted to the user's mobile phone. |
Time_Zone_Name | String | The name of the time zone the user is located in. |
Time_Zone_TZInfo_Name | String | A more specific location for the time zone the user is located in. |
Time_Zone_Utc_Offset | Int | The Coordinated Universal Time offset in seconds from GMT. |
Trend_Location | String | An XML aggregate of trending locations for the user. |
Query a list of users following the current Twitter account.
The authenticated user's followers and a specified user's followers may be viewed from Followers.
By default, Followers will return the followers of the authenticated user. By specifying a Followers_Of_User_Id or Followers_Of_Screen_Name, the followers of the specified user will be returned.
LookUpUsers refers to looking up additional information about the followers returned from Twitter. Normally only the Ids of followers are returned from Twitter. If LookUpUsers is set to true, additional queries will be made to Twitter to retrieve user details, such as the Screen_Name. LookUpUsers is true by default.
MaxUserLookup refers to the maximum number of users to additionally look up information on. A maximum of 100 user details may be returned from Twitter per request. Setting this value higher will cause details for more users to be returned, but at the cost of additional requests. MaxUserLookup defaults to 100.
Name | Type | Description |
ID [KEY] | String | The Id of the user. |
Name | String | The name of the user. |
User_Id | String | The Id of the user. |
Screen_Name | String | The screen name of the user. |
Followers_Of_User_Id | String | Use this in the WHERE clause to retrieve the users a specific user is following other than the authenticated user. |
Followers_Of_Screen_Name | String | Use this in the WHERE clause to retrieve the users a specific user is following other than the authenticated user. |
Location | String | The location of the user. |
Profile_URL | String | The URL for the user's profile. |
Profile_Image_URL | String | The URL for the image of the user. |
Protected | Boolean | The privacy flag of the user. If true, then the user's account is private and only their approved followers can read their tweets or see extended information about them. |
Lang | String | The ISO language code of the user. |
Created_At | Datetime | When the user account was created. |
Friends_Count | Integer | The number of people this user is following. |
Followers_Count | Integer | The number of followers the user has. |
Favourites_Count | Integer | The number of favorites the user has. |
Statuses_Count | Integer | The number of status updates or tweets the user has made. |
UTC_Offset | Integer | The Coordinated Universal Time offset for the user in seconds. |
Time_Zone | String | The time zone of the user. |
Notifications | Boolean | Boolean indicating if the user has notifications enabled. |
Geo_Enabled | Boolean | Boolean indicating if the user has geo-enabled turned on in their profile. |
Verified | Boolean | Boolean indicating if the user account has been verified. |
Following | Boolean | Boolean indicating if the user is following you. |
Contributors_Enabled | Boolean | Boolean indicating if contributors are enabled for the account. Typically used in multiuser accounts. |
Follow_Request_Sent | Boolean | If the user is a protected user, indicates if the authenticated user has sent a request to follow them. |
Listed_Count | Integer | The number of public lists a user is listed in. -1 if unknown. |
Is_Translator | Boolean | Boolean indicating if the user contributes to translating Twitter in other languages. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
LookUpUsers | String | A boolean indicating if you would like to additionally look up details about the user Ids returned. Normally only Ids will be returned from Twitter, but additional requests can be made to Twitter to retrieve user details.
The default value is true. |
MaxUserLookup | String | The maximum number of users to perform a lookup on. Each user lookup is limited to a maximum of 100 Ids per request.
The default value is 100. |
Query the members of a specified list.
Members of a specified list can be found under ListMembers.
The column List_Id can be used to specify the Id of a list you wish to obtain the members of.
Name | Type | Description |
ID [KEY] | String | The Id of the user. |
List_Id | String | The Id of the list. Used to specify the list Id to retrieve tweets from.
The default value is 2031945. |
Name | String | The name of the user. |
Screen_Name | String | The screen name of the user. |
Location | String | The location of the user. |
Profile_URL | String | The URL for the user's profile. |
Profile_Image_URL | String | The URL for the image of the user. |
Protected | Boolean | The privacy flag of the user. If true, then the user's account is private and only their approved followers can read their tweets or see extended information about them. |
Lang | String | The ISO language code of the user. |
Created_At | Datetime | When the user account was created. |
Friends_Count | Integer | The number of people this user is following. |
Followers_Count | Integer | The number of followers the user has. |
Favourites_Count | Integer | The number of favorites the user has. |
Statuses_Count | Integer | The number of status updates or tweets the user has made. |
UTC_Offset | Integer | The Coordinated Universal Time offset for the user in seconds. |
Time_Zone | String | The time zone of the user. |
Notifications | Boolean | Boolean indicating if the user has notifications enabled. |
Geo_Enabled | Boolean | Boolean indicating if the user has geo-enabled turned on in their profile. |
Verified | Boolean | Boolean indicating if the user account has been verified. |
Following | Boolean | Boolean indicating if the user is following you. |
Contributors_Enabled | Boolean | Boolean indicating if contributors are enabled for the account. Typically used in multiuser accounts. |
Follow_Request_Sent | Boolean | If the user is a protected user, this column indicates if the authenticated user has sent a request to follow them. |
Listed_Count | Integer | The number of public lists a user is listed in. -1 if unknown. |
Is_Translator | Boolean | Boolean indicating if the user contributes to translating Twitter in other languages. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Query Twitter list information based on a set of criteria.
Information on Twitter lists may be obtained in Lists. By default, lists that the authenticated user is subscribed to will appear. Lists may returned in several different ways using both pseudo columns and normal columns.
Specify the Subscriber_Id or Subscriber_Screen_Name in the WHERE clause of the request to return lists that the specified Twitter user is subscribed to. Other pseudo columns may not be used when specifying these values.
Specify the Member_Id or Member_Screen_Name in the WHERE clause of the request to return lists that the specified Twitter user is a member of. Other pseudo columns may not be used when specifying these values.
Specify both the Slug and Owner_User_Id or only the Owner_Screen_Name to return one specific list. This is an alternative to specifying the Id of the list and will return only one result.
Name | Type | Description |
ID [KEY] | String | The Id of the list. |
Name | String | The name of the list. |
Full_Name | String | The full name of the list. |
Slug | String | The Slug or name of the list. |
Description | String | A description of the list. |
Subscriber_Count | Integer | The number of subscribers to the list. |
Member_Count | Integer | The number of members in the list. |
Created_At | Datetime | When the list was created. |
Following | Boolean | Boolean indicating if the authenticated user is following the list. |
Mode | String | What mode the list is set to. |
Owner_Id | String | User Id for the owner of the list. |
Owner_Name | String | Name for the owner of the list. |
Owner_Screen_Name | String | Screen name for the owner of the list. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Subscriber_Id | String | Used to retrieve lists the specified User_Id is subscribed to. |
Subscriber_Screen_Name | String | Used to retrieve lists the specified User_Screen_Name is subscribed to. |
Member_Id | String | Used to retrieve lists the specified User_Id is a member of. |
Member_Screen_Name | String | Used to retrieve lists the specified User_Screen_Name is a member of. |
Owner_User_Id | String | Alternative method of specifying a list. Use this with a Slug to specify a list without the List_Id. |
Filter_To_Owned_Lists | Boolean | When set to true or 1 , will return just lists the authenticating user owns, and the user represented by user_id or screen_name is a member of. |
Query the subscribers to a specified list.
Subscribers of a specified list can be found under ListSubscribers.
The column List_Id can be used to specify the Id of a list you wish to obtain the members of.
Name | Type | Description |
ID [KEY] | String | The Id of the user. |
List_Id | String | Used to specify the list Id to retrieve tweets from.
The default value is 2031945. |
Name | String | The name of the user. |
Screen_Name | String | The screen name of the user. |
Location | String | The location of the user. |
Profile_URL | String | The URL for the user's profile. |
Profile_Image_URL | String | The URL for the image of the user. |
Protected | Boolean | The privacy flag of the user. If true, then the user's account is private and only their approved followers can read their tweets or see extended information about them. |
Lang | String | The ISO language code of the user. |
Created_At | Datetime | When the user account was created. |
Friends_Count | Integer | The number of people this user is following. |
Followers_Count | Integer | The number of followers the user has. |
Favourites_Count | Integer | The number of favorites the user has. |
Statuses_Count | Integer | The number of status updates or tweets the user has made. |
UTC_Offset | Integer | The Coordinated Universal Time offset for the user in seconds. |
Time_Zone | String | The time zone of the user. |
Notifications | Boolean | Boolean indicating if the user has notifications enabled. |
Geo_Enabled | Boolean | Boolean indicating if the user has geo-enabled turned on in their profile. |
Verified | Boolean | Boolean indicating if the user account has been verified. |
Following | Boolean | Boolean indicating if the user is following you. |
Contributors_Enabled | Boolean | Boolean indicating if contributors are enabled for the account. Typically used in multiuser accounts. |
Follow_Request_Sent | Boolean | If the user is a protected user, this column indicates if the authenticated user has sent a request to follow them. |
Listed_Count | Integer | The number of public lists a user is listed in. -1 if unknown. |
Is_Translator | Boolean | Boolean indicating if the user contributes to translating Twitter in other languages. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Query the most recent mentions (tweet containing @username) for the authenticating user.
Name | Type | Description |
ID [KEY] | String | The Id of the status update or tweet. Set this value when inserting to instead retweet an existing tweet. |
IDLong | Long | The long type Id of the status update or tweet. |
Created_At | Datetime | When the tweet was made. |
Text | String | The text of the tweet. |
Source | String | Source of the tweet. |
Favorited | Boolean | Boolean indicating if this tweet has been favorited. |
Favorite_Count | Integer | The approximate number of times this tweet has been favorited. |
Retweet_Count | Integer | The number of times the tweet has been retweeted. |
Retweeted_Status_Id | String | Id of the tweet which was retweeted by this one. Empty if the current tweet is not a retweet. |
User_Id | String | Id of the user who made the tweet. |
User_Name | String | Name of the user who made the tweet. |
User_Screen_Name | String | Screen name of the user who made the tweet. |
User_Location | String | Location of the user who made the tweet. |
User_Profile_URL | String | URL to the profile of the user who made the tweet. |
User_Profile_Image_URL | String | URL to the user's profile image. |
User_Mentions | String | Mentions of other users in the tweet, returned as an XML aggregate. |
URLs | String | URLs in the tweet, returned as an XML aggregate. |
Hashtags | String | Hashtags in the tweet, returned as an XML aggregate. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Min_ID | String | Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id must be a valid number but does not need to be a valid tweet Id. |
Max_ID | String | Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or older than the creation date of the specified Id will be returned. The Max_Id must be a valid number but does not need to be a valid tweet Id. |
Include_Entities | Boolean | Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response.
The default value is false. |
Include_Retweets | Boolean | Boolean indicating whether or not to include retweets in the result set.
The default value is true. |
Query a list of retweets of the authenticated user.
Tweets from the authenticated user that have been retweeted by other users will appear in Retweets by default.
The Min_Id and Max_Id pseudo columns may be used to narrow down a range of retweets to return, or to return only recent retweets. Ids are created in increasing numerical order on Twitter. Specifying a Min_Id will return only results with a greater Id or tweets that were created more recently than the specified one. Setting a Max_Id will return only tweets that are older than the creation date of the specified Id. Note that while these values must be valid, non-negative numbers, they do not have to be Ids that exist.
Name | Type | Description |
ID [KEY] | String | The Id of the status update or tweet. |
IDLong | Long | The long type Id of the status update or tweet. |
Created_At | Datetime | When the tweet was made. |
Text | String | The text of the tweet. |
Lang | String | Language code the tweet was made in. |
Source | String | Source of the tweet. |
Favorited | Boolean | Boolean indicating if this tweet has been favorited. |
Favorite_Count | Integer | The approximate number of times this tweet has been favorited. |
Retweeted | Boolean | Boolean indicating if this tweet has been retweeted. |
Retweet_Count | Integer | The number of times the tweet has been retweeted. |
Retweeted_Status_Id | String | Id of the tweet which was retweeted by this one. Empty if the current tweet is not a retweet. |
Truncated | Boolean | Boolean indicating if this tweet has been truncated. |
Filter_Level | String | Indicates the maximum value that may be used and still stream this tweet. |
Possibly_Sensitive | String | This field is available only when a tweet contains a link. The meaning of the field does not pertain to the tweet content itself, but instead it is an indicator that the URL contained in the tweet may contain content or media identified as sensitive content. |
Withheld_Copyright | Boolean | When present and set to true, it indicates that this piece of content has been withheld due to a DMCA complaint. |
Withheld_Scope | String | When present, this column indicates whether the content being withheld is the status or a user. |
Withheld_In_Countries | String | A list of uppercase, two-letter country codes of the countries this content is withheld from. |
Contributors | String | An XML collection of user objects (usually only one) indicating users who contributed to the authorship of the tweet, on behalf of the official tweet author. |
Coordinates_Coordinates | String | The geographic coordinates of this tweet (longitude first, then latitude). |
Coordinates_Type | String | The type of coordinate, if applicable. |
Place_Full_Name | String | The full name of the location of this tweet (city and state). |
Place_Country | String | The country of origin of this tweet. |
Current_User_Retweet_Id | String | Details the tweet Id of the authenticated user's own retweet (if it exists) of this tweet. |
Scopes | String | A set of key-value pairs indicating the intended contextual delivery of the containing tweet. Currently used by Twitter's promoted products. |
In_Reply_To_Status_Id | String | Represents the Id of the original status if this tweet is in reply to another. |
User_Id | String | Id of the user who made the tweet. Use this in the WHERE clause to get retweets for a specific user other than the authenticated user. |
User_Name | String | Name of the user who made the tweet. |
User_Screen_Name | String | Screen name of the user who made the tweet. |
User_Location | String | Location of the user who made the tweet. |
User_Profile_URL | String | URL to the user who made the tweet. |
User_Profile_Image_Url | String | URL to the profile image for the user who made the tweet. |
User_Mentions | String | Mentions of other users in the tweet, returned as an XML aggregate. |
URLs | String | URLs in the tweet, returned as an XML aggregate. |
Hashtags | String | Hashtags in the tweet, returned as an XML aggregate. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
Min_ID | String | Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only retweets that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id must be a valid number but does not need to be a valid retweet Id. |
Max_ID | String | Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only retweets that are equal to or older than the creation date of the specified Id will be returned. The Max_Id must be a valid number but does not need to be a valid retweet Id. |
Include_Entities | Boolean | Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response.
The default value is false. |
Query the daily trending topics from Twitter.
Name | Type | Description |
ID [KEY] | String | A unique Id for the trending topic, denoted by the syntax Date | # |
Date | Datetime | The date for the trending topic. |
Topic | String | The name of the trending topic. |
WoeId | String | A Where on Earth Id for the location the topic is trending. Input this to keep from making an extra request to get the woeId from Twitter each time. |
Country | String | The country the topic is trending in. |
CountryCode | String | The country code the topic is trending in. |
Latitude | String | The latitude where trends are being searched for.
The default value is 40.7142. |
Longitude | String | The longitude where trends are being searched for.
The default value is -74.0064. |
Search_Terms | String | The search terms you would need to search for this trending topic. |
Events | String | Any events associated with the topic. |
Url | String | A URL to the Twitter search for this topic. |
Promoted_Content | String | Any promoted content that is associated with the topic. |
Query public data flowing through Twitter.
TweetStream is a stream that continuously reads public Tweets until the operation is killed. When querying the TweetStream view, you only receive tweets that match against the available rules. To manage the rules use the StreamRules table.
Below is the field you can use to filter the results.
BackfillCount | By passing this parameter, you can recover up to five minutes worth of data that you might have missed during a disconnection. The backfilled Tweets automatically flow through a reconnected stream, with older Tweets generally being delivered before any newly matching Tweets. You must include a whole number between 1 and 5 as the value to this parameter. To use this, please make sure your system is tolerant of duplicate data. |
The following is an example of a query that recovers one minute's worth of data:
SELECT Id, Tweet FROM TweetStream WHERE BackfillMinutes = 1
Name | Type | Description |
Id [KEY] | String | Unique identifier of the Tweet. |
RuleId [KEY] | String | ID of the filter rule that matched against the Tweet delivered. |
AuthorId | String | Unique identifier of the author. |
ContextAnnotations | String | Contains context annotations for the Tweet. |
ConversationId | String | The Tweet ID of the original Tweet of the conversation (which includes direct replies, replies of replies). |
CreatedAt | Datetime | Creation time of the Tweet. |
Entities | String | Contains details about text that has a special meaning in a Tweet. |
InReplyToUserId | String | If this Tweet is a Reply, indicates the user ID of the parent Tweet's author. |
Lang | String | Language of the Tweet, if detected by Twitter. Returned as a BCP47 language tag. |
PossiblySensitive | Bool | Indicates if this Tweet contains URLs marked as sensitive, for example content suitable for mature audiences. |
ReferencedTweets | String | A list of Tweets this Tweet refers to. |
ReplySettings | String | Shows who can reply to this Tweet. Fields returned are everyone, mentionedUsers, and following. |
Source | String | The name of the app the user Tweeted from. |
Text | String | The content of the Tweet. |
EditHistoryTweetIds | String | Unique identifiers indicating all versions of an edited Tweet. For Tweets with no edits, there will be one ID. For Tweets with an edit history, there will be multiple IDs. |
GeoCoordinates | String | A pair of decimal values representing the precise location of the user (latitude, longitude). This value be null unless the user explicitly shared their precise location. |
GeoCoordinatesType | String | Describes the type of coordinate. |
GeoPlaceId | String | The unique identifier of the place, if this is a point of interest tagged in the Tweet. |
AttachmentsMediaKeys | String | List of unique identifiers of media attached to this Tweet. |
AttachmentsPollIds | String | List of unique identifiers of polls present in the Tweets returned. |
EditsRemaining | Int | Indicates the number of remaining edits for the tweet. |
IsEditEligible | Bool | Indicates if a Tweet is eligible for edit. |
EditableUntil | Datetime | Indicates how long the tweet is editable for. |
RetweetCount | Int | Number of times this Tweet has been Retweeted. |
ReplyCount | Int | Number of Replies of this Tweet. |
LikeCount | Int | Number of Likes of this Tweet. |
QuoteCount | Int | Number of times this Tweet has been Retweeted with a comment (also known as Quote). |
ImpressionCount | Int | Number of times this Tweet has been viewed. |
WithheldCopyRight | String | Indicates if the content is being withheld for on the basis of copyright infringement. |
WithheldCountryCodes | String | Provides a list of countries where this content is not available. |
WithheldScope | String | Indicates whether the content being withheld is a Tweet or a user. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
BackfillMinutes | Int | By passing this parameter, you can recover up to five minutes worth of data that you might have missed during a disconnection. The backfilled Tweets will automatically flow through a reconnected stream, with older Tweets generally being delivered before any newly matching Tweets. You must include a whole number between 1 and 5 as the value to this parameter. To use this, please make sure your system is tolerant of duplicate data. |
Query a list of users based on the SearchTerms, Id, or Screen_Name.
Users may be obtained via a search or specified in a list of Ids or screen names.
SearchTerms may be used to search for users in a method that is similar to the Find People search on Twitter.com. Up to the first 1000 matches will be available using SearchTerms.
You can specify either the Screen_Name or User_Id pseudo columns to perform a lookup. Up to 100 screen names or Ids may be specified by using a comma-separated list. Id may also be specified using a comma-separated list and will perform the same lookup.
The Min_Id and Max_Id pseudo columns may be used to narrow down a range of users to return, or to return only recently created users. Ids are created in increasing numerical order on Twitter. Specifying a Min_Id returns only results with a greater Id or tweets that were created more recently than the specified one. Setting a Max_Id returns only tweets that are older than the creation date of the specified Id to return. Note that while these values must be valid, non-negative numbers, they do not have to be Ids that exist.
Name | Type | Description |
ID [KEY] | String | The Id of the user. A comma-separated list of user Ids may be used in the WHERE clause to get data about multiple users. |
SearchTerms | String | A SearchTerms to use while searching users. This can return up to 1000 results. |
Name | String | The name of the user. |
Screen_Name | String | The screen name of the user. |
Location | String | The location of the user. |
Profile_URL | String | The URL for the user's profile. |
Profile_Image_URL | String | The URL for the image of the user. |
Protected | Boolean | The privacy flag of the user. If true, then the user's account is private and only their approved followers can read their tweets or see extended information about them. |
Lang | String | The ISO language code of the user. |
Created_At | Datetime | When the user account was created. |
Friends_Count | Integer | The number of people this user is following. |
Followers_Count | Integer | The number of followers the user has. |
Favourites_Count | Integer | The number of favorites the user has. |
Statuses_Count | Integer | The number of status updates or tweets the user has made. |
UTC_Offset | Integer | The Coordinated Universal Time offset for the user in seconds. |
Time_Zone | String | The time zone of the user. |
Notifications | Boolean | Boolean indicating if the user has notifications enabled. |
Geo_Enabled | Boolean | Boolean indicating if the user has geo-enabled turned on in their profile. |
Verified | Boolean | Boolean indicating if the user account has been verified. |
Following | Boolean | Boolean indicating if the user is following you. |
Contributors_Enabled | Boolean | Boolean indicating if contributors are enabled for the account. Typically used in multiuser accounts. |
Follow_Request_Sent | Boolean | If the user is a protected user, this column indicates if the authenticated user has sent a request to follow them. |
Listed_Count | Integer | The number of public lists a user is listed in. -1 if unknown. |
Is_Translator | Boolean | Boolean indicating if the user contributes to translating Twitter in other languages. |
Description | String | The description of the user. |
Url | String | A URL to the user page on Twitter. |
Default_Profile | Boolean | Boolean indicating if the user is using the default profile design/theme. |
Default_Profile_Image | Boolean | Boolean indicating if the user is using the default Twitter profile image. |
Profile_Background_Color | String | Background color for the user's theme. |
Profile_Background_Image_Url | String | HTTP URL for the user's background image in their theme settings. |
Profile_Background_Image_Url_Https | String | HTTPS URL for the user's background image in their theme settings. |
Profile_Background_Tile | Boolean | Boolean indicating if the user has used the Tile Background checkbox in their theme settings. |
Profile_Image_Url_Https | String | HTTPS URL for the user's profile image. |
Profile_Link_Color | String | Hexadecimal color code for the user's links. |
Profile_Sidebar_Border_Color | String | The sidebar border color for the user. |
Profile_Sidebar_Fill_Color | String | The sidebar fill color for the user. |
Profile_Text_Color | String | The hexadecimal color code for text in the user's settings. |
Profile_Use_Background_Image | String | Boolean indicating if the user is using the background image. |
Show_All_Inline_Media | String | Boolean indicating if the user has enabled viewing all in-line media (pictures, videos, etc). |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
NextPageToken | String | An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken. |
User_ID | String | The Id of the user to return results for. This can be used in the WHERE clause of an SQL statement as a comma-separated list. Only up to 100 user Ids can be submitted per request. |
Min_ID | String | Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only users that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id must be a valid number but does not need to be a valid user Id. |
Max_ID | String | Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only users that are equal to or older than the creation date of the specified Id will be returned. The Max_Id must be a valid number but does not need to be a valid user Id. |
Stored procedures are function-like interfaces that extend the functionality of the Cloud beyond simple SELECT/INSERT/UPDATE/DELETE operations with Twitter.
Stored procedures accept a list of parameters, perform their intended function, and then return any relevant response data from Twitter, along with an indication of whether the procedure succeeded or failed.
Name | Description |
GeoSearch | Run a geo-search against the Twitter service. |
GetRemainingRequests | Returns the number of remaining requests that can be made to Twitter and how long until the request limit is reset. |
ReverseGeoSearch | Reverse-searches a place based on the specified latitude and longitude. |
Run a geo-search against the Twitter service.
Name | Type | Description |
Latitude | String | The latitude to search around. This parameter will be ignored unless it is inside the range -90.0 to 90.0 inclusive. (North is positive.) It will also be ignored if there is not a corresponding Longitude input. |
Longitude | String | The longitude to search around. The valid ranges for longitude are -180.0 to 180.0 inclusive. (East is positive). This parameter will be ignored if it is outside that range, if it is not a number, if Geo_Enabled is disabled, or if there not a corresponding Latitude input. |
IP | String | An IP address. Used when attempting to fix geo-location based off of the user. |
Accuracy | String | A hint on the region in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m. |
ContainedWithin | String | The place Id that you would like to restrict the search results to. Setting this value means only places within the given place Id will be found. |
Granularity | String | The minimal granularity of place types to return. Valid values are poi, neighborhood, city, admin, or country. If no granularity is provided for the request, neighborhood is assumed. Setting this to city, for example, will find places that have a type of city, admin, or country. |
MaxResults | String | A hint as to the number of results to return. This does not guarantee that the number of results returned will equal MaxResults, but instead informs how many nearby results to return. |
Query | String | Free-form text to match against while executing a geo-based query. This parameter is best suited for finding nearby locations by name. Note that the query must be URL encoded. |
Name | Type | Description |
Id | String | The place Id. |
Name | String | Name of the place. |
Country | String | The country name where the coordinates are located. |
CountryCode | String | The code for the country. |
FullName | String | Full name of the place. |
Latitude | String | The latitude of the place. |
Longitude | String | The longitude of the place. |
PlaceType | String | The type of place (city, neighborhood, etc.) |
Returns the number of remaining requests that can be made to Twitter and how long until the request limit is reset.
Name | Type | Description |
Resources | String | A comma-separated list of the resources you want to request rate limit information about. For example: search,users,statuses |
Name | Type | Description |
Remaining_Requests | String | The number of remaining API requests. |
Reset_Time | String | When your available API requests will reset. |
Reset_Time_Seconds | String | The time in seconds since 1/1/1970 when your remaining API requests will be reset. |
Limit | String | Your limit of total API requests per window. At the moment, each window is 15 minutes. |
Api_Request | String | The API request the rate limit information returned goes with. |
Reverse-searches a place based on the specified latitude and longitude.
Name | Type | Description |
Accuracy | String | A hint on the region in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m. |
Granularity | String | This is the minimal granularity of place types to return. Valid values are poi, neighborhood, city, admin, or country. If no granularity is provided for the request, neighborhood is assumed. Setting this to city, for example, will find places that have a type of city, admin, or country. |
Latitude | String | The latitude to search around. This parameter will be ignored unless it is inside the range -90.0 to 90.0 inclusive. (North is positive.) It will also be ignored if there is not a corresponding Longitude input. |
Longitude | String | The longitude to search around. The valid ranges for longitude are -180.0 to 180.0 inclusive. (East is positive.) This parameter will be ignored if it is outside that range, if it is not a number, if Geo_Enabled is disabled, or if there not a corresponding Latitude input. |
MaxResults | String | A hint as to the number of results to return. This does not guarantee that the number of results returned will equal MaxResults, but instead informs how many nearby results to return. |
Name | Type | Description |
Id | String | The place Id. |
Name | String | Name of the place. |
Country | String | The country name where the coordinates are located. |
CountryCode | String | The code of the country. |
FullName | String | Full name of the place. |
Latitude | String | The latitude of the place. |
Longitude | String | The longitude of the place. |
PlaceType | String | The type of place (i.e., city, neighborhood, etc.) |
You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.
The following tables return database metadata for Twitter:
The following tables return information about how to connect to and query the data source:
The following table returns query statistics for data modification queries:
Lists the available databases.
The following query retrieves all databases determined by the connection string:
SELECT * FROM sys_catalogs
Name | Type | Description |
CatalogName | String | The database name. |
Lists the available schemas.
The following query retrieves all available schemas:
SELECT * FROM sys_schemas
Name | Type | Description |
CatalogName | String | The database name. |
SchemaName | String | The schema name. |
Lists the available tables.
The following query retrieves the available tables and views:
SELECT * FROM sys_tables
Name | Type | Description |
CatalogName | String | The database containing the table or view. |
SchemaName | String | The schema containing the table or view. |
TableName | String | The name of the table or view. |
TableType | String | The table type (table or view). |
Description | String | A description of the table or view. |
IsUpdateable | Boolean | Whether the table can be updated. |
Describes the columns of the available tables and views.
The following query returns the columns and data types for the Tweets table:
SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='Tweets'
Name | Type | Description |
CatalogName | String | The name of the database containing the table or view. |
SchemaName | String | The schema containing the table or view. |
TableName | String | The name of the table or view containing the column. |
ColumnName | String | The column name. |
DataTypeName | String | The data type name. |
DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
Length | Int32 | The storage size of the column. |
DisplaySize | Int32 | The designated column's normal maximum width in characters. |
NumericPrecision | Int32 | The maximum number of digits in numeric data. The column length in characters for character and date-time data. |
NumericScale | Int32 | The column scale or number of digits to the right of the decimal point. |
IsNullable | Boolean | Whether the column can contain null. |
Description | String | A brief description of the column. |
Ordinal | Int32 | The sequence number of the column. |
IsAutoIncrement | String | Whether the column value is assigned in fixed increments. |
IsGeneratedColumn | String | Whether the column is generated. |
IsHidden | Boolean | Whether the column is hidden. |
IsArray | Boolean | Whether the column is an array. |
IsReadOnly | Boolean | Whether the column is read-only. |
IsKey | Boolean | Indicates whether a field returned from sys_tablecolumns is the primary key of the table. |
Lists the available stored procedures.
The following query retrieves the available stored procedures:
SELECT * FROM sys_procedures
Name | Type | Description |
CatalogName | String | The database containing the stored procedure. |
SchemaName | String | The schema containing the stored procedure. |
ProcedureName | String | The name of the stored procedure. |
Description | String | A description of the stored procedure. |
ProcedureType | String | The type of the procedure, such as PROCEDURE or FUNCTION. |
Describes stored procedure parameters.
The following query returns information about all of the input parameters for the GetRemainingRequests stored procedure:
SELECT * FROM sys_procedureparameters WHERE ProcedureName='GetRemainingRequests' AND Direction=1 OR Direction=2
Name | Type | Description |
CatalogName | String | The name of the database containing the stored procedure. |
SchemaName | String | The name of the schema containing the stored procedure. |
ProcedureName | String | The name of the stored procedure containing the parameter. |
ColumnName | String | The name of the stored procedure parameter. |
Direction | Int32 | An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters. |
DataTypeName | String | The name of the data type. |
DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
Length | Int32 | The number of characters allowed for character data. The number of digits allowed for numeric data. |
NumericPrecision | Int32 | The maximum precision for numeric data. The column length in characters for character and date-time data. |
NumericScale | Int32 | The number of digits to the right of the decimal point in numeric data. |
IsNullable | Boolean | Whether the parameter can contain null. |
IsRequired | Boolean | Whether the parameter is required for execution of the procedure. |
IsArray | Boolean | Whether the parameter is an array. |
Description | String | The description of the parameter. |
Ordinal | Int32 | The index of the parameter. |
Describes the primary and foreign keys.
The following query retrieves the primary key for the Tweets table:
SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='Tweets'
Name | Type | Description |
CatalogName | String | The name of the database containing the key. |
SchemaName | String | The name of the schema containing the key. |
TableName | String | The name of the table containing the key. |
ColumnName | String | The name of the key column. |
IsKey | Boolean | Whether the column is a primary key in the table referenced in the TableName field. |
IsForeignKey | Boolean | Whether the column is a foreign key referenced in the TableName field. |
PrimaryKeyName | String | The name of the primary key. |
ForeignKeyName | String | The name of the foreign key. |
ReferencedCatalogName | String | The database containing the primary key. |
ReferencedSchemaName | String | The schema containing the primary key. |
ReferencedTableName | String | The table containing the primary key. |
ReferencedColumnName | String | The column name of the primary key. |
Describes the foreign keys.
The following query retrieves all foreign keys which refer to other tables:
SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
Name | Type | Description |
CatalogName | String | The name of the database containing the key. |
SchemaName | String | The name of the schema containing the key. |
TableName | String | The name of the table containing the key. |
ColumnName | String | The name of the key column. |
PrimaryKeyName | String | The name of the primary key. |
ForeignKeyName | String | The name of the foreign key. |
ReferencedCatalogName | String | The database containing the primary key. |
ReferencedSchemaName | String | The schema containing the primary key. |
ReferencedTableName | String | The table containing the primary key. |
ReferencedColumnName | String | The column name of the primary key. |
ForeignKeyType | String | Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key. |
Describes the primary keys.
The following query retrieves the primary keys from all tables and views:
SELECT * FROM sys_primarykeys
Name | Type | Description |
CatalogName | String | The name of the database containing the key. |
SchemaName | String | The name of the schema containing the key. |
TableName | String | The name of the table containing the key. |
ColumnName | String | The name of the key column. |
KeySeq | String | The sequence number of the primary key. |
KeyName | String | The name of the primary key. |
Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.
The following query retrieves all indexes that are not primary keys:
SELECT * FROM sys_indexes WHERE IsPrimary='false'
Name | Type | Description |
CatalogName | String | The name of the database containing the index. |
SchemaName | String | The name of the schema containing the index. |
TableName | String | The name of the table containing the index. |
IndexName | String | The index name. |
ColumnName | String | The name of the column associated with the index. |
IsUnique | Boolean | True if the index is unique. False otherwise. |
IsPrimary | Boolean | True if the index is a primary key. False otherwise. |
Type | Int16 | An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3). |
SortOrder | String | The sort order: A for ascending or D for descending. |
OrdinalPosition | Int16 | The sequence number of the column in the index. |
Returns information on the available connection properties and those set in the connection string.
When querying this table, the config connection string should be used:
jdbc:cdata:twitter:config:
This connection string enables you to query this table without a valid connection.
The following query retrieves all connection properties that have been set in the connection string or set through a default value:
SELECT * FROM sys_connection_props WHERE Value <> ''
Name | Type | Description |
Name | String | The name of the connection property. |
ShortDescription | String | A brief description. |
Type | String | The data type of the connection property. |
Default | String | The default value if one is not explicitly set. |
Values | String | A comma-separated list of possible values. A validation error is thrown if another value is specified. |
Value | String | The value you set or a preconfigured default. |
Required | Boolean | Whether the property is required to connect. |
Category | String | The category of the connection property. |
IsSessionProperty | String | Whether the property is a session property, used to save information about the current connection. |
Sensitivity | String | The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms. |
PropertyName | String | A camel-cased truncated form of the connection property name. |
Ordinal | Int32 | The index of the parameter. |
CatOrdinal | Int32 | The index of the parameter category. |
Hierarchy | String | Shows dependent properties associated that need to be set alongside this one. |
Visible | Boolean | Informs whether the property is visible in the connection UI. |
ETC | String | Various miscellaneous information about the property. |
Describes the SELECT query processing that the Cloud can offload to the data source.
See SQL Compliance for SQL syntax details.
Below is an example data set of SQL capabilities. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.
Name | Description | Possible Values |
AGGREGATE_FUNCTIONS | Supported aggregation functions. | AVG, COUNT, MAX, MIN, SUM, DISTINCT |
COUNT | Whether COUNT function is supported. | YES, NO |
IDENTIFIER_QUOTE_OPEN_CHAR | The opening character used to escape an identifier. | [ |
IDENTIFIER_QUOTE_CLOSE_CHAR | The closing character used to escape an identifier. | ] |
SUPPORTED_OPERATORS | A list of supported SQL operators. | =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR |
GROUP_BY | Whether GROUP BY is supported, and, if so, the degree of support. | NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE |
OJ_CAPABILITIES | The supported varieties of outer joins supported. | NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS |
OUTER_JOINS | Whether outer joins are supported. | YES, NO |
SUBQUERIES | Whether subqueries are supported, and, if so, the degree of support. | NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED |
STRING_FUNCTIONS | Supported string functions. | LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE |
NUMERIC_FUNCTIONS | Supported numeric functions. | ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE |
TIMEDATE_FUNCTIONS | Supported date/time functions. | NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT |
REPLICATION_SKIP_TABLES | Indicates tables skipped during replication. | |
REPLICATION_TIMECHECK_COLUMNS | A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication. | |
IDENTIFIER_PATTERN | String value indicating what string is valid for an identifier. | |
SUPPORT_TRANSACTION | Indicates if the provider supports transactions such as commit and rollback. | YES, NO |
DIALECT | Indicates the SQL dialect to use. | |
KEY_PROPERTIES | Indicates the properties which identify the uniform database. | |
SUPPORTS_MULTIPLE_SCHEMAS | Indicates if multiple schemas may exist for the provider. | YES, NO |
SUPPORTS_MULTIPLE_CATALOGS | Indicates if multiple catalogs may exist for the provider. | YES, NO |
DATASYNCVERSION | The CData Data Sync version needed to access this driver. | Standard, Starter, Professional, Enterprise |
DATASYNCCATEGORY | The CData Data Sync category of this driver. | Source, Destination, Cloud Destination |
SUPPORTSENHANCEDSQL | Whether enhanced SQL functionality beyond what is offered by the API is supported. | TRUE, FALSE |
SUPPORTS_BATCH_OPERATIONS | Whether batch operations are supported. | YES, NO |
SQL_CAP | All supported SQL capabilities for this driver. | SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX |
PREFERRED_CACHE_OPTIONS | A string value specifies the preferred cacheOptions. | |
ENABLE_EF_ADVANCED_QUERY | Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. | YES, NO |
PSEUDO_COLUMNS | A string array indicating the available pseudo columns. | |
MERGE_ALWAYS | If the value is true, The Merge Mode is forcibly executed in Data Sync. | TRUE, FALSE |
REPLICATION_MIN_DATE_QUERY | A select query to return the replicate start datetime. | |
REPLICATION_MIN_FUNCTION | Allows a provider to specify the formula name to use for executing a server side min. | |
REPLICATION_START_DATE | Allows a provider to specify a replicate startdate. | |
REPLICATION_MAX_DATE_QUERY | A select query to return the replicate end datetime. | |
REPLICATION_MAX_FUNCTION | Allows a provider to specify the formula name to use for executing a server side max. | |
IGNORE_INTERVALS_ON_INITIAL_REPLICATE | A list of tables which will skip dividing the replicate into chunks on the initial replicate. | |
CHECKCACHE_USE_PARENTID | Indicates whether the CheckCache statement should be done against the parent key column. | TRUE, FALSE |
CREATE_SCHEMA_PROCEDURES | Indicates stored procedures that can be used for generating schema files. |
The following query retrieves the operators that can be used in the WHERE clause:
SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.
Name | Type | Description |
NAME | String | A component of SQL syntax, or a capability that can be processed on the server. |
VALUE | String | Detail on the supported SQL or SQL syntax. |
Returns information about attempted modifications.
The following query retrieves the Ids of the modified rows in a batch operation:
SELECT * FROM sys_identity
Name | Type | Description |
Id | String | The database-generated Id returned from a data modification operation. |
Batch | String | An identifier for the batch. 1 for a single operation. |
Operation | String | The result of the operation in the batch: INSERTED, UPDATED, or DELETED. |
Message | String | SUCCESS or an error message if the update in the batch failed. |
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.
For more information on establishing a connection, see Establishing a Connection.
Property | Description |
UseAppOnlyAuthentication | A boolean that indicates whether or not you would like to use app-only authentication. |
Property | Description |
OAuthClientId | The client Id assigned when you register your application with an OAuth authorization server. |
OAuthClientSecret | The client secret assigned when you register your application with an OAuth authorization server. |
AuthToken | The authentication token used to request and obtain the OAuth Access Token. |
AuthKey | The authentication key used to request and obtain the OAuth Access Token. |
Property | Description |
SSLServerCert | The certificate to be accepted from the server when connecting using TLS/SSL. |
Property | Description |
Verbosity | The verbosity level that determines the amount of detail included in the log file. |
Property | Description |
BrowsableSchemas | This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC. |
Property | Description |
IsPremiumTwitter | When true, enables access to the Premium Search API. This is false by default. |
MaxRateLimitDelay | The maximum amount of time to delay (in seconds) before submitting a request if it would be rate limited. |
MaxRows | Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses. |
PseudoColumns | This property indicates whether or not to include pseudo columns as columns to the table. |
SearchTerms | Default SearchTerms if none are specified. Used for some tables such as Tweets where SearchTerms may be specified. |
StreamPageSize | The number of results to return per page of data retrieved from the Twitter stream. |
StreamReadDuration | This property represents the maximum time to read streaming data, in seconds. |
StreamTimeout | The maximum number of seconds to continue waiting for results while streaming. When this value is reached and no tweets are returned, then the connection will be closed. |
Timeout | The value in seconds until the timeout error is thrown, canceling the operation. |
This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.
Property | Description |
UseAppOnlyAuthentication | A boolean that indicates whether or not you would like to use app-only authentication. |
A boolean that indicates whether or not you would like to use app-only authentication.
bool
false
Set this to true to have your Twitter app log in to Twitter instead of a user.
This section provides a complete list of the OAuth properties you can configure in the connection string for this provider.
Property | Description |
OAuthClientId | The client Id assigned when you register your application with an OAuth authorization server. |
OAuthClientSecret | The client secret assigned when you register your application with an OAuth authorization server. |
AuthToken | The authentication token used to request and obtain the OAuth Access Token. |
AuthKey | The authentication key used to request and obtain the OAuth Access Token. |
The client Id assigned when you register your application with an OAuth authorization server.
string
""
As part of registering an OAuth application, you will receive the OAuthClientId value, sometimes also called a consumer key, and a client secret, the OAuthClientSecret.
The client secret assigned when you register your application with an OAuth authorization server.
string
""
As part of registering an OAuth application, you will receive the OAuthClientId, also called a consumer key. You will also receive a client secret, also called a consumer secret. Set the client secret in the OAuthClientSecret property.
The authentication token used to request and obtain the OAuth Access Token.
string
""
This property is required only when performing headless authentication in OAuth 1.0. It can be obtained from the GetOAuthAuthorizationUrl stored procedure.
It can be supplied alongside the AuthKey in the GetOAuthAccessToken stored procedure to obtain the OAuthAccessToken.
The authentication key used to request and obtain the OAuth Access Token.
string
""
This property is required only when performing headless authentication in OAuth 1.0. It can be obtained from the GetOAuthAuthorizationUrl stored procedure.
It can be supplied alongside the AuthToken in the GetOAuthAccessToken stored procedure to obtain the OAuthAccessToken.
This section provides a complete list of the SSL properties you can configure in the connection string for this provider.
Property | Description |
SSLServerCert | The certificate to be accepted from the server when connecting using TLS/SSL. |
The certificate to be accepted from the server when connecting using TLS/SSL.
string
""
If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.
This property can take the following forms:
Description | Example |
A full PEM Certificate (example shortened for brevity) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
A path to a local file containing the certificate | C:\cert.cer |
The public key (example shortened for brevity) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
The MD5 Thumbprint (hex values can also be either space or colon separated) | ecadbdda5a1529c58a1e9e09828d70e4 |
The SHA1 Thumbprint (hex values can also be either space or colon separated) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
If not specified, any certificate trusted by the machine is accepted.
Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.
This section provides a complete list of the Logging properties you can configure in the connection string for this provider.
Property | Description |
Verbosity | The verbosity level that determines the amount of detail included in the log file. |
The verbosity level that determines the amount of detail included in the log file.
string
"1"
The verbosity level determines the amount of detail that the Cloud reports to the Logfile. Verbosity levels from 1 to 5 are supported. These are detailed in the Logging page.
This section provides a complete list of the Schema properties you can configure in the connection string for this provider.
Property | Description |
BrowsableSchemas | This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC. |
This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
string
""
Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.
This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.
Property | Description |
IsPremiumTwitter | When true, enables access to the Premium Search API. This is false by default. |
MaxRateLimitDelay | The maximum amount of time to delay (in seconds) before submitting a request if it would be rate limited. |
MaxRows | Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses. |
PseudoColumns | This property indicates whether or not to include pseudo columns as columns to the table. |
SearchTerms | Default SearchTerms if none are specified. Used for some tables such as Tweets where SearchTerms may be specified. |
StreamPageSize | The number of results to return per page of data retrieved from the Twitter stream. |
StreamReadDuration | This property represents the maximum time to read streaming data, in seconds. |
StreamTimeout | The maximum number of seconds to continue waiting for results while streaming. When this value is reached and no tweets are returned, then the connection will be closed. |
Timeout | The value in seconds until the timeout error is thrown, canceling the operation. |
When true, enables access to the Premium Search API. This is false by default.
bool
false
With this property enabled, you can return tweets from searches older than 7 days ago.
The EnvType and DevEnvironment pseudo columns may be used to query Premium Search APIs. EnvType specifies the environment type. It can take one of 30day or fullarchive values.
The default value is 30day. The DevEnvironment is required in order to query the Premium Search API and must be set to the value of the dev environment label, created in your Twitter Developer Account.
The maximum amount of time to delay (in seconds) before submitting a request if it would be rate limited.
string
"60"
Twitter uses different rate limits for total number of requests for different endpoints. These can range from as few as 15 per 15 minute window, up to 900 for a 15 minute window. Internally the CData Cloud keeps track of if a given request would result in a rate limit exception. If a rate limit would occur, the CData Cloud can internally delay submitting a request until the limit is up. However, this could also result in waiting for several minutes before requesting data, which is also not a good behavior.
The MaxRateLimitDelay gives control over the maximum amount of time the CData Cloud will wait once it detects a rate limit would occur. Since the amount of time the CData Cloud needs to wait can be calculated, if it would have to wait longer than the MaxRateLimitDelay, it will simply error immediately when it sees the time would take too long.
Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
int
-1
Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
This property indicates whether or not to include pseudo columns as columns to the table.
string
""
This setting is particularly helpful in Entity Framework, which does not allow you to set a value for a pseudo column unless it is a table column. The value of this connection setting is of the format "Table1=Column1, Table1=Column2, Table2=Column3". You can use the "*" character to include all tables and all columns; for example, "*=*".
Default SearchTerms if none are specified. Used for some tables such as Tweets where SearchTerms may be specified.
string
""
Default SearchTerms if none are specified. Used for some tables such as Tweets where SearchTerms may be specified.
The number of results to return per page of data retrieved from the Twitter stream.
string
"50"
The number of results to return per page of data retrieved from the Twitter stream.
This property represents the maximum time to read streaming data, in seconds.
int
0
Set StreamReadDuration property to consume streaming data for a specific time period. When StreamReadDuration is reached and StreamTimeout is 0, then the connection will be closed.
The maximum number of seconds to continue waiting for results while streaming. When this value is reached and no tweets are returned, then the connection will be closed.
string
"0"
Set the value of StreamTimeout to 0 in order to keep the connection open indefinitely. Note that, if the value of this property is greater than zero, the value of the StreamPageSize property, will be overwriten and will be set to one(1).
The value in seconds until the timeout error is thrown, canceling the operation.
int
60
If Timeout = 0, operations do not time out. The operations run until they complete successfully or until they encounter an error condition.
If Timeout expires and the operation is not yet complete, the Cloud throws an exception.