Table: reddit_subreddit_post_search - Query Reddit Subreddit Posts using SQL
Reddit is a social news aggregation, web content rating, and discussion platform. Registered members submit content to the site such as links, text posts, 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.
Table Usage Guide
The reddit_subreddit_post_search
table provides insights into Subreddit Posts within Reddit. As a data analyst, explore post-specific details through this table, including content, comments, and associated metadata. Utilize it to uncover information about posts, such as trending topics, popular comments, and user engagement levels.
Important Notes
- You must specify both
subreddit
andquery
in thewhere
clause to query this table.
Examples
Search the "aws" subreddit for "steampipe"
Explore the popularity and relevance of Steampipe within the AWS community on Reddit. This query helps identify posts that mention 'steampipe', allowing users to understand its significance and usage trends among AWS users.
select rank, title, created_utc, score, urlfrom reddit_subreddit_post_searchwhere subreddit = 'aws' and query = 'steampipe'order by rank;
select rank, title, created_utc, score, urlfrom reddit_subreddit_post_searchwhere subreddit = 'aws' and query = 'steampipe'order by rank;
Schema for reddit_subreddit_post_search
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
author | text | Author of the post. | |
author_fullname | text | Full name of the author for the post. | |
created_utc | timestamp with time zone | Time when the post was created. | |
edited | timestamp with time zone | Time when the post was edited. | |
id | text | ID of the post. | |
is_self | boolean | ||
likes | boolean | True if you've upvoted the post. False if you've downvoted it. Otherwise null. | |
locked | boolean | True if the post is locked. | |
name | text | Slug (full ID) of the post. | |
num_comments | bigint | Number of comments on the post. | |
over_18 | boolean | True if the post is not safe for work (over 18). | |
permalink | text | Permalink (path only) to the post. | |
query | text | = | Search query string. |
rank | bigint | Rank of the post among the result rows, use for sorting. | |
saved | boolean | True if the post has been saved. | |
score | bigint | Score of the post. | |
selftext | text | Body of the post. | |
spoiler | boolean | True if the post is a spoiler. | |
stickied | boolean | True if the post has been stickied. | |
subreddit | text | = | Name of the subreddit, e.g. aws. |
subreddit_id | text | ID of the subreddit. | |
subreddit_name_prefixed | text | Prefixed name of the subreddit, e.g. /r/aws. | |
subreddit_subscribers | bigint | Number of subscribers to the subreddit. | |
title | text | Title of the post. | |
upvote_ratio | double precision | Upvote ratio of the post. | |
url | text | URL the post links to, or of the post itself. |
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_subreddit_post_search