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ingual
|
| 6 |
+
tags:
|
| 7 |
+
- wikidata
|
| 8 |
+
- knowledge-graph
|
| 9 |
+
- parquet
|
| 10 |
+
- duckdb
|
| 11 |
+
size_categories:
|
| 12 |
+
- 1B<n<10B
|
| 13 |
+
pretty_name: Wikidata Truthy (Parquet)
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Wikidata Truthy — Parquet
|
| 17 |
+
|
| 18 |
+
The complete [Wikidata](https://www.wikidata.org/) truthy snapshot (March 2026), converted from the raw N-Triples dump into optimized Parquet files.
|
| 19 |
+
|
| 20 |
+
**1.7 billion statements** across 108 million entities, queryable directly with DuckDB — no SPARQL endpoint needed.
|
| 21 |
+
|
| 22 |
+
## Files
|
| 23 |
+
|
| 24 |
+
| File | Rows | Size | Description |
|
| 25 |
+
|------|------|------|-------------|
|
| 26 |
+
| `statements.parquet` | 1,703,849,656 | 7.6 GB | All truthy statements (Q-item as subject) |
|
| 27 |
+
| `labels.parquet` | 372,000,059 | 3.4 GB | Labels for all entities in all available languages |
|
| 28 |
+
| `items.parquet` | 108,425,819 | 2.1 GB | One row per entity with best available label (English preferred) |
|
| 29 |
+
| `items_descriptions.parquet` | 101,268,772 | 340 MB | English descriptions for entities |
|
| 30 |
+
| `property_statements.parquet` | 300,032 | 2.9 MB | Statements about properties (P-item as subject) |
|
| 31 |
+
| `properties.parquet` | 13,304 | 446 KB | Property labels and descriptions |
|
| 32 |
+
|
| 33 |
+
## Schemas
|
| 34 |
+
|
| 35 |
+
### statements.parquet
|
| 36 |
+
|
| 37 |
+
The main table. Each row is one truthy statement about a Wikidata item.
|
| 38 |
+
|
| 39 |
+
| Column | Type | Description |
|
| 40 |
+
|--------|------|-------------|
|
| 41 |
+
| `subject` | INT32 | Item ID (e.g. `31` for Q31/Belgium) |
|
| 42 |
+
| `property` | INT16 | Property ID (e.g. `31` for P31/instance-of) |
|
| 43 |
+
| `object_id` | INT32 | Target entity ID when the object is a Wikidata entity, NULL otherwise |
|
| 44 |
+
| `object_value` | VARCHAR | Literal value (number, date, string, coordinate), NULL when `object_id` is set |
|
| 45 |
+
| `datatype` | TINYINT | Type code for the object (see below) |
|
| 46 |
+
|
| 47 |
+
**Datatype codes:**
|
| 48 |
+
|
| 49 |
+
| Code | Type | Example |
|
| 50 |
+
|------|------|---------|
|
| 51 |
+
| 0 | Entity reference (Q) | Q5 (human) |
|
| 52 |
+
| 1 | Time | 2026-03-23T13:50:18Z |
|
| 53 |
+
| 2 | Quantity | +5821746 |
|
| 54 |
+
| 3 | String | "1000063" |
|
| 55 |
+
| 4 | Monolingual text | Belgium@en |
|
| 56 |
+
| 5 | Globe coordinate | Point(5.47 49.49) |
|
| 57 |
+
| 6 | URL | http://... |
|
| 58 |
+
| 7 | Other | External URIs, unknown types |
|
| 59 |
+
| 8 | Entity reference (P) | Property reference |
|
| 60 |
+
|
| 61 |
+
### items.parquet
|
| 62 |
+
|
| 63 |
+
Lookup table: one row per entity with the best available label.
|
| 64 |
+
|
| 65 |
+
| Column | Type | Description |
|
| 66 |
+
|--------|------|-------------|
|
| 67 |
+
| `qid` | INT32 | Entity ID |
|
| 68 |
+
| `label` | VARCHAR | Best label (English preferred, falls back through 40 languages) |
|
| 69 |
+
| `label_lang` | VARCHAR | Language of the chosen label |
|
| 70 |
+
|
| 71 |
+
### items_descriptions.parquet
|
| 72 |
+
|
| 73 |
+
| Column | Type | Description |
|
| 74 |
+
|--------|------|-------------|
|
| 75 |
+
| `qid` | INT32 | Entity ID |
|
| 76 |
+
| `description` | VARCHAR | English description |
|
| 77 |
+
|
| 78 |
+
### labels.parquet
|
| 79 |
+
|
| 80 |
+
All labels in all languages.
|
| 81 |
+
|
| 82 |
+
| Column | Type | Description |
|
| 83 |
+
|--------|------|-------------|
|
| 84 |
+
| `qid` | INT32 | Entity ID |
|
| 85 |
+
| `lang` | VARCHAR | Language code |
|
| 86 |
+
| `label` | VARCHAR | Label text |
|
| 87 |
+
|
| 88 |
+
### properties.parquet
|
| 89 |
+
|
| 90 |
+
| Column | Type | Description |
|
| 91 |
+
|--------|------|-------------|
|
| 92 |
+
| `pid` | INT16 | Property ID |
|
| 93 |
+
| `label` | VARCHAR | Property label (English) |
|
| 94 |
+
| `description` | VARCHAR | Property description (English) |
|
| 95 |
+
|
| 96 |
+
### property_statements.parquet
|
| 97 |
+
|
| 98 |
+
Same schema as `statements` but for statements where the subject is a property (P-entity).
|
| 99 |
+
|
| 100 |
+
| Column | Type | Description |
|
| 101 |
+
|--------|------|-------------|
|
| 102 |
+
| `subject` | INT16 | Property ID |
|
| 103 |
+
| `property` | INT16 | Property ID |
|
| 104 |
+
| `object_id` | INT32 | Target entity ID (nullable) |
|
| 105 |
+
| `object_label` | VARCHAR | Resolved label of target entity (nullable) |
|
| 106 |
+
| `object_value` | VARCHAR | Literal value (nullable) |
|
| 107 |
+
| `datatype` | TINYINT | Type code |
|
| 108 |
+
|
| 109 |
+
## Quick Start with DuckDB
|
| 110 |
+
|
| 111 |
+
No download needed — query directly from Hugging Face:
|
| 112 |
+
|
| 113 |
+
```sql
|
| 114 |
+
-- Find all "instance of" (P31) values for Q42 (Douglas Adams)
|
| 115 |
+
SELECT s.subject, p.label AS property, i.label AS value
|
| 116 |
+
FROM 'hf://datasets/RichardDelome/wikidata_truthy/statements.parquet' s
|
| 117 |
+
JOIN 'hf://datasets/RichardDelome/wikidata_truthy/properties.parquet' p ON p.pid = s.property
|
| 118 |
+
JOIN 'hf://datasets/RichardDelome/wikidata_truthy/items.parquet' i ON i.qid = s.object_id
|
| 119 |
+
WHERE s.subject = 42 AND s.property = 31;
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
```sql
|
| 123 |
+
-- Look up an entity by name
|
| 124 |
+
SELECT qid, label
|
| 125 |
+
FROM 'hf://datasets/RichardDelome/wikidata_truthy/items.parquet'
|
| 126 |
+
WHERE label = 'Douglas Adams';
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
```sql
|
| 130 |
+
-- All items that are "instance of" "human" (Q5) born in a specific year
|
| 131 |
+
SELECT i.label, s2.object_value AS birth_date
|
| 132 |
+
FROM 'hf://datasets/RichardDelome/wikidata_truthy/statements.parquet' s1
|
| 133 |
+
JOIN 'hf://datasets/RichardDelome/wikidata_truthy/statements.parquet' s2
|
| 134 |
+
ON s2.subject = s1.subject AND s2.property = 569 -- P569 = date of birth
|
| 135 |
+
JOIN 'hf://datasets/RichardDelome/wikidata_truthy/items.parquet' i
|
| 136 |
+
ON i.qid = s1.subject
|
| 137 |
+
WHERE s1.property = 31 AND s1.object_id = 5 -- P31 = instance of, Q5 = human
|
| 138 |
+
AND s2.object_value LIKE '+1952%'
|
| 139 |
+
LIMIT 20;
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
## Source
|
| 143 |
+
|
| 144 |
+
Built from [Wikidata's latest-truthy N-Triples dump](https://dumps.wikimedia.org/wikidatawiki/entities/) (March 26, 2026).
|
| 145 |
+
|
| 146 |
+
Only **truthy** statements are included — the current best-ranked value for each property on each item, excluding deprecated and non-preferred ranks.
|
| 147 |
+
|
| 148 |
+
## License
|
| 149 |
+
|
| 150 |
+
The data is from Wikidata and is available under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).
|