steampipe plugin install reddit

Table: reddit_my_saved_post - Query Reddit Saved Posts using SQL

Reddit is a social media platform that allows users to discuss and vote on content shared by other users. Users can save posts for later reference; these saved posts can be from any subreddit and include various details such as the post's title, author, subreddit, and more. This functionality is part of the overall user interaction with the platform, contributing to the personalized user experience.

Table Usage Guide

The reddit_my_saved_post table provides insights into a user's saved posts within Reddit. As a data analyst, explore post-specific details through this table, including title, author, subreddit, and associated metadata. Utilize it to uncover information about saved posts, such as those from specific subreddits, posts by certain authors, and the nature of the content saved by the user. The schema presents a range of attributes of the saved post for your analysis, like the post ID, title, author, subreddit, and more.

Examples

List five most recent posts

Explore the most recent activities on your Reddit account by identifying the five latest saved posts. This can help you keep track of your recent interactions and interests.

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

List top five posts by score

Gain insights into the most popular posts based on their score. This query helps you identify the top five posts, offering a quick overview of the most engaging content.

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

List posts by subreddit

Discover the segments that garner the most engagement on your saved Reddit posts. This allows you to focus your attention on the most active subreddits, thus optimizing your Reddit usage.

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

List posts that contain the word "docs"

Discover the segments that include references to "docs" in your saved posts on Reddit. This can help you quickly locate posts that mention documentation or similar topics.

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

Schema for reddit_my_saved_post

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
authortextAuthor of the post.
author_idtextFull name of the author for the post.
bodytextBody of the post.
createdtimestamp with time zoneTime when the post was created.
editedtimestamp with time zoneTime when the post was edited.
full_idtextSlug (full ID) of the post.
idtextID of the post.
is_self_postboolean
likesbooleanTrue if you've upvoted the post. False if you've downvoted it. Otherwise null.
lockedbooleanTrue if the post is locked.
nsfwbooleanTrue if the post is not safe for work (over 18).
number_of_commentsbigintNumber of comments on the post.
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.
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.
subreddit_idtextID of the subreddit.
subreddit_nametextName of the subreddit, e.g. aws.
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_saved_post