steampipe plugin install reddit

Table: reddit_my_post - Query Reddit Posts using SQL

Reddit is a network of communities based on people's interests. It allows users to post content, including text posts, links, and images, which are then voted up or down by other members. Posts are organized by subject into user-created boards called "subreddits", which cover a variety of topics like news, science, movies, video games, music, books, fitness, food, and image-sharing.

Table Usage Guide

The reddit_my_post table provides insights into a user's posts on Reddit. As a data analyst or social media manager, explore post-specific details through this table, including post title, content, subreddit, upvotes, and more. Utilize it to uncover information about user's post activity, engagement, and the popularity of posts across different subreddits.

Examples

5 most recent posts

Discover the latest updates or additions to your Reddit posts. This query can be used to keep track of your most recent posts, helping you to maintain an active and timely presence on the platform.

select
created_utc,
title,
url
from
reddit_my_post
order by
created_utc desc
limit
5;
select
created_utc,
title,
url
from
reddit_my_post
order by
created_utc desc
limit
5;

Top 5 posts by score

Discover the most popular posts based on their scores to understand what content resonates most with your audience. This can help you tailor future content to increase engagement and upvotes.

select
score,
upvote_ratio,
title,
url
from
reddit_my_post
order by
score desc
limit
5;
select
score,
upvote_ratio,
title,
url
from
reddit_my_post
order by
score desc
limit
5;

Posts by subreddit

Explore which subreddits you are most active in by counting the number of posts you have made in each. This can help you understand your Reddit usage patterns and areas of interest.

select
subreddit_name_prefixed,
count(*)
from
reddit_my_post
group by
subreddit_name_prefixed
order by
count desc;
select
subreddit_name_prefixed,
count(*)
from
reddit_my_post
group by
subreddit_name_prefixed
order by
count(*) desc;

Posts containing the word "docs"

Discover the segments that include the word 'docs' within your Reddit posts. This can help you analyze the frequency and context of discussions about documentation, providing insights into user engagement and potential areas of improvement.

select
created_utc,
title,
url,
selftext
from
reddit_my_post
where
selftext ilike '%docs%'
order by
created_utc;
select
created_utc,
title,
url,
selftext
from
reddit_my_post
where
selftext like '%docs%'
order by
created_utc;

Schema for reddit_my_post

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
authortextAuthor of the post.
author_fullnametextFull name of the author for the post.
created_utctimestamp with time zoneTime when the post was created.
editedtimestamp with time zoneTime when the post was edited.
idtextID of the post.
is_selfboolean
likesbooleanTrue if you've upvoted the post. False if you've downvoted it. Otherwise null.
lockedbooleanTrue if the post is locked.
nametextSlug (full ID) of the post.
num_commentsbigintNumber of comments on the post.
over_18booleanTrue if the post is not safe for work (over 18).
permalinktextPermalink (path only) to the post.
rankbigintRank of the post among the result rows, use for sorting.
savedbooleanTrue if the post has been saved.
scorebigintScore of the post.
selftexttextBody of the post.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
spoilerbooleanTrue if the post is a spoiler.
stickiedbooleanTrue if the post has been stickied.
subreddittextName of the subreddit, e.g. aws.
subreddit_idtextID of the subreddit.
subreddit_name_prefixedtextPrefixed name of the subreddit, e.g. /r/aws.
subreddit_subscribersbigintNumber of subscribers to the subreddit.
titletextTitle of the post.
upvote_ratiodouble precisionUpvote ratio of the post.
urltextURL the post links to, or of the post itself.
usernametext=, !=, ~~, ~~*, !~~, !~~*The authorized username.

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)" -- reddit

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

steampipe_export_reddit --config '<your_config>' reddit_my_post