steampipe plugin install reddit

Table: reddit_my_saved_comment - Query Reddit Saved Comments using SQL

Reddit is a social news aggregation, web content rating, and discussion website. Registered members submit content to the site such as links, text posts, and images, which are then voted up or down by other members. The saved comments feature allows users to save specific comments for later reference.

Table Usage Guide

The reddit_my_saved_comment table provides insights into user's saved comments within Reddit. As a data analyst, explore user-specific details through this table, including the content of the saved comments, the author of the comments, and the subreddit in which the comments were made. Utilize it to uncover information about user behavior and preferences, such as the topics they are interested in and the discussions they engage in. The schema presents a range of attributes of the saved comments for your analysis, like the comment body, creation date, author, and associated subreddit.

Examples

List five most recent comments

Explore the most recent discussions you've saved on Reddit. This query is useful for quickly accessing and reviewing your latest interactions, without having to manually sift through your comment history.

select
created_utc,
permalink,
body
from
reddit_my_saved_comment
order by
created_utc desc
limit
5;
select
created_utc,
permalink,
body
from
reddit_my_saved_comment
order by
created_utc desc
limit
5;

List top five comments by score

Discover the highest-rated comments from your saved Reddit comments. This can help you quickly identify popular opinions or trending topics within your saved content.

select
score,
permalink,
body,
replies
from
reddit_my_saved_comment
order by
score desc
limit
5;
select
score,
permalink,
body,
replies
from
reddit_my_saved_comment
order by
score desc
limit
5;

List comments by subreddit

Explore which subreddits your saved comments are most frequently associated with to understand your engagement patterns across different communities.

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

List comments that contain the word "docs"

Explore comments that include the term 'docs'. This can be useful to identify discussions or references related to documentation, aiding in information gathering and community engagement.

select
created_utc,
permalink,
body
from
reddit_my_saved_comment
where
body ilike '%docs%'
order by
created_utc;
select
created_utc,
permalink,
body
from
reddit_my_saved_comment
where
body like '%docs%'
order by
created_utc;

Schema for reddit_my_saved_comment

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
authortextAuthor of the comment.
author_flair_idtextID of the flair template of the author for the comment.
author_flair_texttextFlair text of the author for the comment.
author_idtextFull name of the author for the comment.
bodytextBody of the comment.
can_gildbooleanIndicates whether the comment can be gilded or not.
comment_repliesjsonbReplies to the comment.
controversialitybigintControversiality score of the comment.
createdtimestamp with time zoneTime when the comment was created.
editedtimestamp with time zoneTime when the comment was edited.
full_idtextSlug (full ID) of the comment.
idtextID of the comment.
is_submitterbooleanTrue if the comment is a spoiler.
likesbooleanTrue if you've upvoted the comment. False if you've downvoted it. Otherwise null.
lockedbooleanTrue if the comment is locked.
nsfwbooleanTrue if the comment is not safe for work (over 18).
parent_idtextPermalink (path only) to the comment.
permalinktextPermalink (path only) to the comment.
post_authortextAuthor of the post.
post_idtextID of the post this comment is from.
post_num_commentsbigintNumber of comments for the post.
post_permalinktextPermanlink of the post.
post_titletextTitle of the post.
rankbigintRank of the comment among the result rows, use for sorting.
savedbooleanTrue if the comment has been saved.
scorebigintScore of the comment.
score_hiddenbooleanTrue if the score is hidden on this comment.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
stickiedbooleanTrue if the comment 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.
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_comment