steampipe plugin install reddit

Table: reddit_subreddit_moderator - Query Reddit Subreddit Moderators using SQL

Reddit is a network of communities based on people's interests. Subreddits are the communities within Reddit, each of which is managed by a team of moderators. These moderators are responsible for enforcing community rules, removing content that violates these rules, and generally maintaining the health of their community.

Table Usage Guide

The reddit_subreddit_moderator table provides insights into the moderators of different subreddits on Reddit. As a community manager or researcher, explore moderator-specific details through this table, including their permissions, subreddit affiliations, and associated metadata. Utilize it to understand the distribution of moderation responsibilities, identify active and inactive moderators, and analyze the moderation structure of different subreddits.

Important Notes

  • You must specify the subreddit in the where clause to query this table.

Examples

List moderators from the subreddit "aws"

Explore which users have moderation permissions in a specific subreddit to understand the distribution of moderation roles and responsibilities.

select
name,
mod_permissions
from
reddit_subreddit_moderator
where
subreddit = 'aws'
order by
name;
select
name,
mod_permissions
from
reddit_subreddit_moderator
where
subreddit = 'aws'
order by
name;

List moderators with "all" permission

Explore which moderators have comprehensive permissions within a specific online community, such as 'aws', to better manage user roles and access rights. This can be useful for assessing user privileges and maintaining security protocols.

select
name,
mod_permissions
from
reddit_subreddit_moderator
where
subreddit = 'aws'
and mod_permissions ? 'all'
order by
name;
select
name,
mod_permissions
from
reddit_subreddit_moderator
where
subreddit = 'aws'
and json_extract(mod_permissions, '$.all') is not null
order by
name;

Schema for reddit_subreddit_moderator

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
datetimestamp with time zoneTime when the subreddit was created.
idtextID of the moderator user.
mod_permissionsjsonbModeration permissions granted to the user.
nametextName of the moderator user.
rel_idtextID of the ban.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
subreddittext=Subreddit for this moderator.
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_subreddit_moderator