Matillion ETL Data Model for Twitter
|
string
""
Identifier of the advertising account. This Id is used to get analytic stats for the account that is identified by this Id. The AddAccounts view can be used to list available accounts with their specific Ids.
bool
false
Set this to true to have your Twitter app log in to Twitter instead of a user.
string
"OFF"
The following options are available:
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.
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.
string
""
The OAuthAccessToken property is used to connect using OAuth. The OAuthAccessToken is retrieved from the OAuth server as part of the authentication process. It has a server-dependent timeout and can be reused between requests.
The access token is used in place of your user name and password. The access token protects your credentials by keeping them on the server.
string
""
The OAuthAccessTokenSecret property is used to connect and authenticate using OAuth. The OAuthAccessTokenSecret is retrieved from the OAuth server as part of the authentication process. It is used with the OAuthAccessToken and can be used for multiple requests until it times out.
string
"%APPDATA%\\CData\\Twitter Data Provider\\OAuthSettings.txt"
When InitiateOAuth is set to GETANDREFRESH or REFRESH, the driver saves OAuth values to avoid requiring the user to manually enter OAuth connection properties and allowing the credentials to be shared across connections or processes.
Alternatively to specifying a file path, memory storage can be used instead. Memory locations are specified by using a value starting with 'memory://' followed by a unique identifier for that set of credentials (ex: memory://user1). The identifier can be anything you choose but should be unique to the user. Unlike with the file based storage, you must manually store the credentials when closing the connection with memory storage to be able to set them in the connection when the process is started again. The OAuth property values can be retrieved with a query to the sys_connection_props system table. If there are multiple connections using the same credentials, the properties should be read from the last connection to be closed.
If left unspecified, the default location is "%APPDATA%\\CData\\Twitter Data Provider\\OAuthSettings.txt" with %APPDATA% being set to the user's configuration directory:
Platform | %APPDATA% |
Windows | The value of the APPDATA environment variable |
Mac | ~/Library/Application Support |
Linux | ~/.config |
string
""
During the authentication process, the OAuth authorization server redirects the user to this URL. This value must match the callback URL you specify in your app settings.
string
""
The verifier code returned from the OAuth authorization URL. This can be used on systems where a browser cannot be launched such as headless systems.
See Establishing a Connection to obtain the OAuthVerifier value.
Set OAuthSettingsLocation along with OAuthVerifier. When you connect, the driver exchanges the OAuthVerifier for the OAuth authentication tokens and saves them, encrypted, to the specified file. Set InitiateOAuth to GETANDREFRESH automate the exchange.
Once the OAuth settings file has been generated, you can remove OAuthVerifier from the connection properties and connect with OAuthSettingsLocation set.
To automatically refresh the OAuth token values, set OAuthSettingsLocation and additionally set InitiateOAuth to REFRESH.
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.
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.
string
""
Pair with OAuthTokenTimestamp to determine when the AccessToken will expire.
string
""
Pair with OAuthExpiresIn to determine when the AccessToken will expire.
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.
Certificates are validated as trusted by the machine based on the System's trust store. The trust store used is the 'javax.net.ssl.trustStore' value specified for the system. If no value is specified for this property, Java's default trust store is used (for example, JAVA_HOME\lib\security\cacerts).
Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.
string
"NONE"
This property specifies the protocol that the driver will use to tunnel traffic through the FirewallServer proxy. Note that by default, the driver connects to the system proxy; to disable this behavior and connect to one of the following proxy types, set ProxyAutoDetect to false.
Type | Default Port | Description |
TUNNEL | 80 | When this is set, the driver opens a connection to Twitter and traffic flows back and forth through the proxy. |
SOCKS4 | 1080 | When this is set, the driver sends data through the SOCKS 4 proxy specified by FirewallServer and FirewallPort and passes the FirewallUser value to the proxy, which determines if the connection request should be granted. |
SOCKS5 | 1080 | When this is set, the driver sends data through the SOCKS 5 proxy specified by FirewallServer and FirewallPort. If your proxy requires authentication, set FirewallUser and FirewallPassword to credentials the proxy recognizes. |
To connect to HTTP proxies, use ProxyServer and ProxyPort. To authenticate to HTTP proxies, use ProxyAuthScheme, ProxyUser, and ProxyPassword.
string
""
This property specifies the IP address, DNS name, or host name of a proxy allowing traversal of a firewall. The protocol is specified by FirewallType: Use FirewallServer with this property to connect through SOCKS or do tunneling. Use ProxyServer to connect to an HTTP proxy.
Note that the driver uses the system proxy by default. To use a different proxy, set ProxyAutoDetect to false.
int
0
This specifies the TCP port for a proxy allowing traversal of a firewall. Use FirewallServer to specify the name or IP address. Specify the protocol with FirewallType.
string
""
The FirewallUser and FirewallPassword properties are used to authenticate against the proxy specified in FirewallServer and FirewallPort, following the authentication method specified in FirewallType.
string
""
This property is passed to the proxy specified by FirewallServer and FirewallPort, following the authentication method specified by FirewallType.
bool
false
This takes precedence over other proxy settings, so you'll need to set ProxyAutoDetect to FALSE in order use custom proxy settings.
NOTE: When this property is set to True, the proxy used is determined as follows:
To connect to an HTTP proxy, see ProxyServer. For other proxies, such as SOCKS or tunneling, see FirewallType.
string
""
The hostname or IP address of a proxy to route HTTP traffic through. The driver can use the HTTP, Windows (NTLM), or Kerberos authentication types to authenticate to an HTTP proxy.
If you need to connect through a SOCKS proxy or tunnel the connection, see FirewallType.
By default, the driver uses the system proxy. If you need to use another proxy, set ProxyAutoDetect to false.
int
80
The port the HTTP proxy is running on that you want to redirect HTTP traffic through. Specify the HTTP proxy in ProxyServer. For other proxy types, see FirewallType.
string
"BASIC"
This value specifies the authentication type to use to authenticate to the HTTP proxy specified by ProxyServer and ProxyPort.
Note that the driver will use the system proxy settings by default, without further configuration needed; if you want to connect to another proxy, you will need to set ProxyAutoDetect to false, in addition to ProxyServer and ProxyPort. To authenticate, set ProxyAuthScheme and set ProxyUser and ProxyPassword, if needed.
The authentication type can be one of the following:
If you need to use another authentication type, such as SOCKS 5 authentication, see FirewallType.
string
""
The ProxyUser and ProxyPassword options are used to connect and authenticate against the HTTP proxy specified in ProxyServer.
You can select one of the available authentication types in ProxyAuthScheme. If you are using HTTP authentication, set this to the user name of a user recognized by the HTTP proxy. If you are using Windows or Kerberos authentication, set this property to a user name in one of the following formats:
user@domain domain\user
string
""
This property is used to authenticate to an HTTP proxy server that supports NTLM (Windows), Kerberos, or HTTP authentication. To specify the HTTP proxy, you can set ProxyServer and ProxyPort. To specify the authentication type, set ProxyAuthScheme.
If you are using HTTP authentication, additionally set ProxyUser and ProxyPassword to HTTP proxy.
If you are using NTLM authentication, set ProxyUser and ProxyPassword to your Windows password. You may also need these to complete Kerberos authentication.
For SOCKS 5 authentication or tunneling, see FirewallType.
By default, the driver uses the system proxy. If you want to connect to another proxy, set ProxyAutoDetect to false.
string
"AUTO"
This property determines when to use SSL for the connection to an HTTP proxy specified by ProxyServer. This value can be AUTO, ALWAYS, NEVER, or TUNNEL. The applicable values are the following:
AUTO | Default setting. If the URL is an HTTPS URL, the driver will use the TUNNEL option. If the URL is an HTTP URL, the component will use the NEVER option. |
ALWAYS | The connection is always SSL enabled. |
NEVER | The connection is not SSL enabled. |
TUNNEL | The connection is through a tunneling proxy. The proxy server opens a connection to the remote host and traffic flows back and forth through the proxy. |
string
""
The ProxyServer is used for all addresses, except for addresses defined in this property. Use semicolons to separate entries.
Note that the driver uses the system proxy settings by default, without further configuration needed; if you want to explicitly configure proxy exceptions for this connection, you need to set ProxyAutoDetect = false, and configure ProxyServer and ProxyPort. To authenticate, set ProxyAuthScheme and set ProxyUser and ProxyPassword, if needed.
string
""
Once this property is set, the driver will populate the log file as it carries out various tasks, such as when authentication is performed or queries are executed. If the specified file doesn't already exist, it will be created.
Connection strings and version information are also logged, though connection properties containing sensitive information are masked automatically.
If a relative filepath is supplied, the location of the log file will be resolved based on the path found in the Location connection property.
For more control over what is written to the log file, you can adjust the Verbosity property.
Log contents are categorized into several modules. You can show/hide individual modules using the LogModules property.
To edit the maximum size of a single logfile before a new one is created, see MaxLogFileSize.
If you would like to place a cap on the number of logfiles generated, use MaxLogFileCount.
Java logging is also supported. To enable Java logging, set Logfile to:
Logfile=JAVALOG://myloggername
As in the above sample, JAVALOG:// is a required prefix to use Java logging, and you will substitute your own Logger.
The supplied Logger's getLogger method is then called, using the supplied value to create the Logger instance. If a logging instance already exists, it will reference the existing instance.
When Java logging is enabled, the Verbosity will now correspond to specific logging levels.
string
"1"
The verbosity level determines the amount of detail that the driver reports to the Logfile. Verbosity levels from 1 to 5 are supported. These are detailed in the Logging page.
string
""
Only the modules specified (separated by ';') will be included in the log file. By default all modules are included.
See the Logging page for an overview.
string
"100MB"
When the limit is hit, a new log is created in the same folder with the date and time appended to the end. The default limit is 100 MB. Values lower than 100 kB will use 100 kB as the value instead.
Adjust the maximum number of logfiles generated with MaxLogFileCount.
int
-1
When the limit is hit, a new log is created in the same folder with the date and time appended to the end and the oldest log file will be deleted.
The minimum supported value is 2. A value of 0 or a negative value indicates no limit on the count.
Adjust the maximum size of the logfiles generated with MaxLogFileSize.
string
"%APPDATA%\\CData\\Twitter Data Provider\\Schema"
The path to a directory which contains the schema files for the driver (.rsd files for tables and views, .rsb files for stored procedures). The folder location can be a relative path from the location of the executable. The Location property is only needed if you want to customize definitions (for example, change a column name, ignore a column, and so on) or extend the data model with new tables, views, or stored procedures.
If left unspecified, the default location is "%APPDATA%\\CData\\Twitter Data Provider\\Schema" with %APPDATA% being set to the user's configuration directory:
Platform | %APPDATA% |
Windows | The value of the APPDATA environment variable |
Mac | ~/Library/Application Support |
Linux | ~/.config |
string
""
Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.
string
""
Listing the tables from some databases can be expensive. Providing a list of tables in the connection string improves the performance of the driver.
This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.
Specify the tables you want in a comma-separated list. Each table should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space`.
Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.
string
""
Listing the views from some databases can be expensive. Providing a list of views in the connection string improves the performance of the driver.
This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.
Specify the views you want in a comma-separated list. Each view should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space`.
Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.
bool
false
When AutoCache = true, the driver automatically maintains a cache of your table's data in the database of your choice. By default, the driver incrementally updates the cache, retrieving only changes since the last SELECT query was run if the length of time since the last run has exceeded the CacheTolerance. After the cache is updated, the query is executed against the cached data.
When AutoCache = true, the driver caches to a simple, file-based cache. You can configure its location or cache to a different database with the following properties:
string
""
You can cache to any database for which you have a JDBC driver, including CData JDBC drivers.
The cache database is determined based on the CacheDriver and CacheConnection properties. The CacheDriver is the name of the JDBC driver class that you want to use to cache data.
Note that you must also add the CacheDriver JAR file to the classpath.
The following examples show how to cache to several major databases. Refer to CacheConnection for more information on the JDBC URL syntax and typical connection properties.
The driver simplifies Derby configuration. Java DB is the Oracle distribution of Derby. The JAR file is shipped in the JDK. You can find the JAR file, derby.jar, in the db subfolder of the JDK installation. In most caching scenarios, you need to specify only the following, after adding derby.jar to the classpath:
jdbc:twitter:CacheLocation='c:/Temp/cachedir';InitiateOAuth=GETANDREFRESH;To customize the Derby JDBC URL, use CacheDriver and CacheConnection. For example, to cache to an in-memory database, use a JDBC URL like the following:
jdbc:twitter:CacheDriver=org.apache.derby.jdbc.EmbeddedDriver;CacheConnection='jdbc:derby:memory';InitiateOAuth=GETANDREFRESH;
The following is a JDBC URL for the SQLite JDBC driver:
jdbc:twitter:CacheDriver=org.sqlite.JDBC;CacheConnection='jdbc:sqlite:C:/Temp/sqlite.db';InitiateOAuth=GETANDREFRESH;
The following is a JDBC URL for the included CData JDBC Driver for MySQL:
jdbc:twitter:Cache Driver=cdata.jdbc.mysql.MySQLDriver;Cache Connection='jdbc:mysql:Server=localhost;Port=3306;Database=cache;User=root;Password=123456';InitiateOAuth=GETANDREFRESH;
The following JDBC URL uses the Microsoft JDBC Driver for SQL Server:
jdbc:twitter:Cache Driver=com.microsoft.sqlserver.jdbc.SQLServerDriver;Cache Connection='jdbc:sqlserver://localhost\sqlexpress:7437;user=sa;password=123456;databaseName=Cache';InitiateOAuth=GETANDREFRESH;
The following is a JDBC URL for the Oracle Thin Client:
jdbc:twitter:Cache Driver=oracle.jdbc.OracleDriver;CacheConnection='jdbc:oracle:thin:scott/tiger@localhost:1521:orcldb';InitiateOAuth=GETANDREFRESH;
NOTE: If using a version of Oracle older than 9i, the cache driver will instead be oracle.jdbc.driver.OracleDriver .
The following JDBC URL uses the official PostgreSQL JDBC driver:
jdbc:twitter:CacheDriver=cdata.jdbc.postgresql.PostgreSQLDriver;CacheConnection='jdbc:postgresql:User=postgres;Password=admin;Database=postgres;Server=localhost;Port=5432;';InitiateOAuth=GETANDREFRESH;
string
""
The cache database is determined based on the CacheDriver and CacheConnection properties. Both properties are required to use the cache database. Examples of common cache database settings can be found below. For more information on setting the caching database's driver, refer to CacheDriver.
The connection string specified in the CacheConnection property is passed directly to the underlying CacheDriver. Consult the documentation for the specific JDBC driver for more information on the available properties. Make sure to include the JDBC driver in your application's classpath.
The driver simplifies caching to Derby, only requiring you to set the CacheLocation property to make a basic connection.
Alternatively, you can configure the connection to Derby manually using CacheDriver and CacheConnection. The following is the Derby JDBC URL syntax:
jdbc:derby:[subsubprotocol:][databaseName][;attribute=value[;attribute=value] ... ]
For example, to cache to an in-memory database, use the following:
jdbc:derby:memory
To cache to SQLite, you can use the SQLite JDBC driver. The following is the syntax of the JDBC URL:
jdbc:sqlite:dataSource
The installation includes the CData JDBC Driver for MySQL. The following is an example JDBC URL:
jdbc:mysql:User=root;Password=root;Server=localhost;Port=3306;Database=cache
The following are typical connection properties:
The JDBC URL for the Microsoft JDBC Driver for SQL Server has the following syntax:
jdbc:sqlserver://[serverName[\instance][:port]][;database=databaseName][;property=value[;property=value] ... ]
For example:
jdbc:sqlserver://localhost\sqlexpress:1433;integratedSecurity=true
The following are typical SQL Server connection properties:
To use integrated security, you will also need to add sqljdbc_auth.dll to a folder on the Windows system path. This file is located in the auth subfolder of the Microsoft JDBC Driver for SQL Server installation. The bitness of the assembly must match the bitness of your JVM.
The following is the conventional JDBC URL syntax for the Oracle JDBC Thin driver:
jdbc:oracle:thin:[userId/password]@[//]host[[:port][:sid]]
For example:
jdbc:oracle:thin:scott/tiger@myhost:1521:orcl
The following are typical connection properties:
Data Source: The connect descriptor that identifies the Oracle database. This can be a TNS connect descriptor, an Oracle Net Services name that resolves to a connect descriptor, or, after version 11g, an Easy Connect naming (the host name of the Oracle server with an optional port and service name).
The following is the JDBC URL syntax for the official PostgreSQL JDBC driver:
jdbc:postgresql:[//[host[:port]]/]database[[?option=value][[&option=value][&option=value] ... ]]
For example, the following connection string connects to a database on the default host (localhost) and port (5432):
jdbc:postgresql:postgres
The following are typical connection properties:
string
"%APPDATA%\\CData\\Twitter Data Provider"
The CacheLocation is a simple, file-based cache. The driver uses Java DB, Oracle's distribution of the Derby database. To cache to Java DB, you will need to add the Java DB JAR file to the classpath. The JAR file, derby.jar, is shipped in the JDK and located in the db subfolder of the JDK installation.
If left unspecified, the default location is "%APPDATA%\\CData\\Twitter Data Provider" with %APPDATA% being set to the user's configuration directory:
Platform | %APPDATA% |
Windows | The value of the APPDATA environment variable |
Mac | ~/Library/Application Support |
Linux | ~/.config |
int
600
The tolerance for stale data in the cache specified in seconds. This only applies when AutoCache is used. The driver checks with the data source for newer records after the tolerance interval has expired. Otherwise, it returns the data directly from the cache.
bool
false
When Offline = true, all queries execute against the cache as opposed to the live data source. In this mode, certain queries like INSERT, UPDATE, DELETE, and CACHE are not allowed.
bool
false
As you execute queries with this property set, table metadata in the Twitter catalog are cached to the file store specified by CacheLocation if set or the user's home directory otherwise. A table's metadata will be retrieved only once, when the table is queried for the first time.
The driver automatically persists metadata in memory for up to two hours when you first discover the metadata for a table or view and therefore, CacheMetadata is generally not required. CacheMetadata becomes useful when metadata operations are expensive such as when you are working with large amounts of metadata or when you have many short-lived connections.
int
0
When BatchSize is set to a value greater than 0, the batch operation will split the entire batch into separate batches of size BatchSize. The split batches will then be submitted to the server individually. This is useful when the server has limitations on the size of the request that can be submitted.
Setting BatchSize to 0 will submit the entire batch as specified.
int
0
The maximum lifetime of a connection in seconds. Once the time has elapsed, the connection object is disposed. The default is 0 which indicates there is no limit to the connection lifetime.
bool
false
When set to true, a connection will be made to Twitter when the connection is opened. This property enables the Test Connection feature available in various database tools.
This feature acts as a NOOP command as it is used to verify a connection can be made to Twitter and nothing from this initial connection is maintained.
Setting this property to false may provide performance improvements (depending upon the number of times a connection is opened).
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.
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 JDBC Driver for Twitter keeps track of if a given request would result in a rate limit exception. If a rate limit would occur, the CData JDBC Driver for Twitter 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 JDBC Driver for Twitter will wait once it detects a rate limit would occur. Since the amount of time the CData JDBC Driver for Twitter 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.
int
-1
Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.
string
""
The properties listed below are available for specific use cases. Normal driver use cases and functionality should not require these properties.
Specify multiple properties in a semicolon-separated list.
CachePartial=True | Caches only a subset of columns, which you can specify in your query. |
QueryPassthrough=True | Passes the specified query to the cache database instead of using the SQL parser of the driver. |
DefaultColumnSize | Sets the default length of string fields when the data source does not provide column length in the metadata. The default value is 2000. |
ConvertDateTimeToGMT | Determines whether to convert date-time values to GMT, instead of the local time of the machine. |
RecordToFile=filename | Records the underlying socket data transfer to the specified file. |
int
60
The allowed idle time a connection can remain in the pool until the connection is closed. The default is 60 seconds.
int
100
The maximum connections in the pool. The default is 100. To disable this property, set the property value to 0 or less.
int
1
The minimum number of connections in the pool. The default is 1.
int
60
The max seconds to wait for a connection to become available. If a new connection request is waiting for an available connection and exceeds this time, an error is thrown. By default, new requests wait forever for an available connection.
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, "*=*".
bool
false
If this property is set to true, the driver will allow only SELECT queries. INSERT, UPDATE, DELETE, and stored procedure queries will cause an error to be thrown.
string
""
The RTK property may be used to license a build. See the included licensing file to see how to set this property. The runtime key is only available if you purchased an OEM license.
string
""
Default SearchTerms if none are specified. Used for some tables such as Tweets where SearchTerms may be specified.
string
"50"
The number of results to return per page of data retrieved from the Twitter stream.
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.
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).
bool
true
When SupportEnhancedSQL = true, the driver offloads as much of the SELECT statement processing as possible to Twitter and then processes the rest of the query in memory. In this way, the driver can execute unsupported predicates, joins, and aggregation.
When SupportEnhancedSQL = false, the driver limits SQL execution to what is supported by the Twitter API.
The driver determines which of the clauses are supported by the data source and then pushes them to the source to get the smallest superset of rows that would satisfy the query. It then filters the rest of the rows locally. The filter operation is streamed, which enables the driver to filter effectively for even very large datasets.
The driver uses various techniques to join in memory. The driver trades off memory utilization against the requirement of reading the same table more than once.
The driver retrieves all rows necessary to process the aggregation in memory.
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 driver throws an exception.
bool
false
This property enables connection pooling. The default is false. See Connection Pooling for information on using connection pools.
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.
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 | String |
Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response. The allowed values are true, false. 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.
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 | String |
Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response. The allowed values are true, false. 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.
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. |
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.
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 | String |
Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response. The allowed values are true, false. The default value is false. |
Include_Retweets | String |
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 allowed values are true, false. 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. |
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 | String | Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response.
The allowed values are true, false. The default value is false. |
Include_Retweets | String | Boolean indicating whether or not to include retweets in the result set.
The allowed values are true, false. 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 | String | Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response.
The allowed values are true, false. 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 will continuously read public Tweets until the operation is killed.
Below are the fields that can be specified to filter the results.
Follow | A comma-separated list of user Ids, indicating the users you are following whose Tweets should be delivered on the stream. |
Track | A comma-separated list of phrases that will be used to deliver the Tweets on the stream containing the phrases. |
Language | Return Tweets that have been detected as being written in the specified list of comma-separated languages. You must use BCP 47 language identifiers, such as 'en','fr','ja'. Twitter will respond with a "406 Not Acceptable" error if the coordinates entered were incorrect. |
Locations | A comma-separated list of longitude and latitude pairs specifying a set of bounding boxes to filter Tweets by. You must use at least two pairs of longitude and latitude coordinates, with the first pair indicating the southwest bound of the region you will search in. |
BackfillCount | When reconnecting to a streaming endpoint, the BackfillCount parameter may be included to attempt to backfill missed messages that occurred during the disconnect period. The supplied value can be an integer from 1 to 150000 or from -1 to -150000. If a positive number is specified, the stream will transition to live values once the backfilled values have been delivered to the client. If a negative number is specified, the stream will disconnect once the backfilled values have been delivered to the client. This filter is only allowed to users with these elevated access roles: Firehose, Links, Birddog and Shadow. Twitter will respond with a "416 Requested Range Not Satisfiable" error if your role does not support this filter. |
Filter_Level | The level of tweets returned. The default value is none, which includes all available Tweets. |
SELECT * FROM TweetStream WHERE Follow = '51192312'
If either Follow, Track, or Language, is not specified, a small random sample of all public Tweets will be returned, and using any other filter is not going to affect Twitter's streaming results.
Retrieve a large number of tweets that contain the word 'Assembly' in the tweet's body:
SELECT * FROM TweetStream WHERE Track = 'Assembly' AND Filter_Level='low'
The following filter will retrieve all tweets originating from New York City:
SELECT * FROM TweetStream WHERE Locations = '-74,40,-73,41'
Retrieve tweets in the French or English language containing the word 'fillet', and if disconnected, stop retrieving after 50 tweets:
SELECT * FROM TweetStream WHERE Track = 'fillet' AND Language = 'fr,en' AND BackfillCount='-50'
Name | Type | Description |
ID | String | The Id of the status update or tweet. Set this value when inserting to retweet an existing 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 of the Filter_Level parameter that can 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. |
Contributors | String | A JSON 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 users own retweet (if it exists) of this tweet. |
In_Reply_To_Status_Id | String | Represents the Id of the original status if this tweet is in reply to another. |
In_Reply_To_User_Id | String | Represents the Id of the original user if this tweet is in reply to another. |
From_User_Id | String | 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 | 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 | Name of the user who made the tweet. |
From_User_Location | String | Location of the user who made the tweet. |
From_User_Profile_URL | String | URL to the user who made the tweet. This is not returned when a SearchTerms is specified. |
From_User_Profile_Image_Url | String | URL to the profile image for the from user. |
User_Mentions | String | Mentions of other users in the tweet, returned as an JSON aggregate. |
URLs | String | URLs in the tweet, returned as an XML aggregate. |
Hashtags | String | Hashtags in the tweet, returned as an XML aggregate. |
Follow | String | A comma separated list of user IDs, indicating the users whose Tweets should be delivered on the stream. Following protected users is not supported. |
Track | String | A comma separated list of phrases which will be used to determine what Tweets will be delivered on the stream. |
Language | String | Setting this parameter to a comma-separated list of BCP 47 language identifiers corresponding to any of the languages listed on Twitter's advanced search page will only return Tweets that have been detected as being written in the specified languages. |
Locations | String | A comma separated list of longitude,latitude pairs specifying a set of bounding boxes to filter Tweets by. Only geolocated Tweets falling within the requested bounding boxes will be included unlike the Search API, the location of the user field is not used to filter Tweets. |
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 |
BackfillCount | String | When reconnecting to a streaming endpoint, the count parameter may included to attempt to backfill missed messages which occurred during the disconnect period. The supplied value may be an integer from 1 to 150000 or from -1 to -150000. If a positive number is specified, the stream will transition to live values once the backfill has been delivered to the client. If a negative number is specified, the stream will disconnect once the backfill has been delivered to the client. |
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. A comma-separated list of screen names may be used in the WHERE clause to get data about multiple users. |
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. |