File size: 2,493 Bytes
7f1d3bf
 
cf538ca
7f1d3bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf538ca
7f1d3bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5acf097
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---

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.)