VIEWVIEWVIEW's picture
Update README.md
cf538ca verified
|
Raw History Blame Contribute Delete
2.49 kB
---
pretty_name: pr0gramm user comments
license: mit
language:
- de
- en
task_categories:
- other
---
# pr0gramm-usercomments
This dataset contains SQLite exports of pr0gramm item metadata and comments.
## Initial Crawl
The initial full snapshot is:
- `pr0gramm.sqlite3`
Initial full-crawl coverage:
- Highest `items.item_id`: `6986879`
- Highest `comments.item_id`: `6986879`
## Weekly Delta DBs
Incremental updates are published as additional SQLite files in the dataset root.
Filename pattern:
- `pr0_delta_YYYY-Www_ids_<upper>_<lower>.sqlite3`
Meaning:
- `<upper>` = highest crawled item id in that delta
- `<lower>` = lowest crawled item id in that delta
- IDs in a delta are crawled descending from `<upper>` to `<lower>`
Delta crawl policy:
- Weekly incremental crawl
- Only IDs newer than the previous `last_known_id`
- 14-day maturity delay before crawling (to capture most comments)
- No revisit of older IDs in weekly mode
Delta schema normalization:
- Delta DBs are normalized to match the vacuumed base schema exactly.
- Only tables: `items`, `comments`
- No crawler-internal tables (for example `crawl_state`, `item_detail_failures`)
## Merge Strategy
To merge a delta into the base DB:
1. Attach delta DB to a local copy of `pr0gramm.sqlite3`
2. Upsert/insert by primary keys:
- `items.item_id`
- `comments.comment_id`
Because IDs are monotonic and deltas are non-overlapping ranges, merge operations are straightforward and deterministic.
## Tables
The vacuumed schema is:
- `comments`
- `items`
### comments schema
- `comment_id` INTEGER PRIMARY KEY
- `item_id` INTEGER NOT NULL
- `parent_comment_id` INTEGER
- `comment_time` INTEGER
- `score` INTEGER
- `upvotes` INTEGER
- `downvotes` INTEGER
- `user_name` TEXT
- `user_id` INTEGER
- `user_profile_url` TEXT
- `body` TEXT
- `raw_json` TEXT NOT NULL
### items schema
- `item_id` INTEGER PRIMARY KEY
- `promoted` INTEGER
- `flags` INTEGER
- `created_at` INTEGER
- `user_name` TEXT
- `source_feed` TEXT NOT NULL
- `raw_json` TEXT NOT NULL
## Notes
- Timestamps are stored as Unix seconds.
- `raw_json` contains API payload snapshots and may include fields not normalized into separate columns.
# User status
user_status.sqlite3 is a single snapshot of the user mark of each user (e.g. whether they are administrator, moderator, old user ("altschwuchtel"), new user ("neuschwuchtel") etc.)