steampipe plugin install twitter

Table: twitter_tweet - Query Twitter Tweets using SQL

Twitter is a widely used social media platform that allows users to post and interact with messages known as "tweets". The platform provides a robust API, enabling the extraction of vast amounts of public data for analysis. This includes data about tweets, users, hashtags, and more.

Table Usage Guide

The twitter_tweet table gives insights into individual tweets on the Twitter platform. As a data analyst or social media manager, you can delve into tweet-specific details through this table, including content, user, location, and associated metadata. Use it to analyze tweet patterns, user interactions, and trending topics for strategic decision-making and targeted marketing campaigns.

Important Notes

Examples

Get tweet by ID

Discover the specific content and details of a particular tweet using its unique identification number. This can be useful for understanding the context, engagement, or user behavior related to that particular tweet.

select
*
from
twitter_tweet
where
id = '1373134228620214275';
select
*
from
twitter_tweet
where
id = '1373134228620214275';

Schema for twitter_tweet

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
attachment_pollsjsonbPolls attached to the Tweet.
attachmentsjsonbSpecifies the type of attachments (if any) present in this Tweet.
authorjsonbAuthor of the Tweet.
author_idtextUnique identifier of the author of the Tweet.
cashtagsjsonbList of cashtags (e.g. $TWTR) mentioned in the Tweet.
context_annotationsjsonbContains context annotations for the Tweet.
conversation_idtextThe Tweet ID of the original Tweet of the conversation (which includes direct replies, replies of replies).
created_attimestamp with time zoneCreation time of the Tweet.
entitiesjsonbContains details about text that has a special meaning in a Tweet.
geojsonbContains details about the location tagged by the user in this Tweet, if they specified one.
hashtagsjsonbList of hashtags (e.g. #sql) mentioned in the Tweet.
idtext=Unique identifier of this Tweet.
in_reply_to_user_idtextIf this Tweet is a Reply, indicates the user ID of the parent Tweet's author.
in_reply_userjsonbUser the Tweet was in reply to.
langtextLanguage of the Tweet, if detected by Twitter. Returned as a BCP47 language tag.
mentionsjsonbList of users (e.g. steampipeio) mentioned in the Tweet.
mentions_objjsonbUsers mentioned in the Tweet.
placejsonbPlace where the Tweet was created.
possibly_sensitivebooleanIndicates if this Tweet contains URLs marked as sensitive, for example content suitable for mature audiences.
public_metricsjsonbEngagement metrics for the Tweet at the time of the request.
quotedtextIf this Tweet is a Quote Tweet, indicates the ID of the original Tweet.
referenced_tweetsjsonbTweets referenced in this Tweet.
replied_totextIf this Tweet is a Reply, indicates the ID of the Tweet it is a reply to.
retweetedtextIf this Tweet is a Retweet, indicates the ID of the orginal Tweet.
sourcetextThe name of the app the user Tweeted from.
texttextThe content of the Tweet.
urlsjsonbList of URLs (e.g. https://steampipe.io) mentioned in the Tweet.
withheldjsonbContains withholding details for withheld content.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- twitter

You can pass the configuration to the command with the --config argument:

steampipe_export_twitter --config '<your_config>' twitter_tweet