Table: twitter_user - Query Twitter Users using SQL
Twitter is a social networking service where users post and interact with messages known as 'tweets'. It allows users to follow others and be followed, retweet posts, like posts, and more. Twitter Users are the individual accounts that participate in this network, each with a unique username, profile details, and tweet history.
Table Usage Guide
The twitter_user
table provides insights into Twitter Users within the Twitter social networking service. As a social media analyst or digital marketer, explore user-specific details through this table, including profile information, follower counts, and tweet history. Utilize it to uncover information about users, such as their interests, associations, and influence within the Twitter community.
Important Notes
- To query lists of users see twitter_user_follower or twitter_user_following or twitter_user_mention instead.
- The
id
(preferred) orusername
field must be set in thewhere
clause.
Examples
Get user by ID
Determine the specific user details on Twitter by using their unique ID. This can be particularly useful in understanding the user's activity and profile information without having to manually search for them.
select *from twitter_userwhere id = '1318177503995985921';-- @steampipeio
select *from twitter_userwhere id = '1318177503995985921';-- @steampipeio
Get user by username
Explore which user details are associated with a specific username on Twitter. This can be beneficial in scenarios where you need to understand the profile details of a particular user for research or analysis purposes.
select *from twitter_userwhere username = 'steampipeio';
select *from twitter_userwhere username = 'steampipeio';
Schema for twitter_user
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
created_at | timestamp with time zone | The UTC datetime that the user account was created on Twitter. | |
description | text | The text of this user's profile description (also known as bio), if the user provided one. | |
entities | jsonb | Entities are JSON objects that provide additional information about hashtags, urls, user mentions, and cashtags associated with the description. | |
id | text | = | The unique identifier of this user. |
location | text | The location specified in the user's profile, if the user provided one. As this is a freeform value, it may not indicate a valid location, but it may be fuzzily evaluated when performing searches with location queries. | |
name | text | The name of the user, as they’ve defined it on their profile. Not necessarily a person’s name. | |
pinned_tweet | jsonb | Contains withholding details for withheld content, if applicable. | |
pinned_tweet_id | text | Unique identifier of this user's pinned Tweet. | |
profile_image_url | text | The URL to the profile image for this user, as shown on the user's profile. | |
protected | text | Indicates if this user has chosen to protect their Tweets (in other words, if this user's Tweets are private). | |
public_metrics | jsonb | Contains details about activity for this user. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
url | text | The URL specified in the user's profile, if present. | |
username | text | = | The Twitter screen name, handle, or alias that this user identifies themselves with. Usernames are unique but subject to change. |
verified | boolean | Indicates if this user is a verified Twitter User. | |
withheld | jsonb | Contains withholding details for withheld content, if applicable. |
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_user