Table: hackernews_new - Query HackerNews New Stories using SQL
HackerNews is a social news website focusing on computer science and entrepreneurship. It is run by Y Combinator, a startup accelerator that provides seed funding for startups. HackerNews allows users to submit stories (known as "posts"), which are voted and commented upon, similar to reddit.
Table Usage Guide
The hackernews_new
table provides insights into the latest stories posted on HackerNews. As a data analyst or a social media marketer, explore the most recent discussions through this table, including the post's title, author, and score. Utilize it to uncover information about the latest trends, popular topics, and the engagement level of different posts.
Examples
New stories by score
Explore the latest stories on Hacker News, sorted by popularity. This query can help you stay updated with trending topics and discussions.
select *from hackernews_neworder by score desc;
select *from hackernews_neworder by score desc;
New stories with most comments
Discover the latest stories that have sparked the most discussion, helping you stay updated on trending topics and popular conversations. This is particularly useful for identifying key interests and engaging discussions within your community.
select *from hackernews_neworder by descendants desc;
select *from hackernews_neworder by descendants desc;
Query examples
- hackernews_dashboard_ask_and_show_by_hour
- hackernews_dashboard_avg_score
- hackernews_dashboard_max_score
- hackernews_dashboard_mentions
- hackernews_dashboard_stories_by_hour
- hackernews_dashboard_user_with_greater_than_5_post
- hackernews_dashboard_user_with_greater_than_50_score
- hackernews_sources_detail
- hackernews_sources_domain_input
- hackernews_sources_domains
- hackernews_sources_top_10_domains_by_count
- hackernews_sources_top_10_domains_by_max_score
- hackernews_stories_avg_comments
- hackernews_stories_details
- hackernews_stories_max_comments
Schema for hackernews_new
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
by | text | The username of the item's author. | |
dead | boolean | True if the item is dead. | |
deleted | boolean | True if the item is deleted. | |
descendants | bigint | In the case of stories or polls, the total comment count. | |
id | bigint | = | The item's unique id. |
kids | jsonb | The ids of the item's comments, in ranked display order. | |
parent | bigint | The comment's parent: either another comment or the relevant story. | |
parts | jsonb | A list of related pollopts, in display order. | |
poll | bigint | The pollopt's associated poll. | |
score | bigint | The story's score, or the votes for a pollopt. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
text | text | The comment, story or poll text. HTML. | |
time | timestamp with time zone | Timestamp when the item was created. | |
title | text | The title of the story, poll or job. HTML. | |
type | text | The type of item. One of "job", "story", "comment", "poll", or "pollopt". | |
url | text | The URL of the story. |
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)" -- hackernews
You can pass the configuration to the command with the --config
argument:
steampipe_export_hackernews --config '<your_config>' hackernews_new