# Documents
## Documentation
The documents: proposals, letters, minutes, motions as files, attachments. The text is not in this table; read it with DocumentTextById, the file with DocumentPdfById. Read from the export of the platform, 1 000 records per request, for every selected source: a full read of every source takes over 100 minutes at the rate limit of the platform, one source of 20 000 records some 20 seconds. Narrow it with use <source>@obv.
- Catalog: `OpenBesluitvorming`
- Schema: `Export`
- Primary Keys: `entity_id`
The data in this table is partitioned per value of the `` column.
This is a read-only table. The Open Besluitvorming API may not support changing the data or the Invantive UniversalSQL driver for Open Besluitvorming does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Open Besluitvorming API.
## Table Columns
The columns of the table `Documents` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `changed_at` | `datetime` | | ☑ | When the platform recorded this version, UTC. |
| `classification` | `varchar2` | | ☐ | The kind as the source system names it, such as Agenda, Moties or Raadsinformatiebrieven; several separated by a comma. |
| `commit_id` | `varchar2` | | ☐ | The id of this version. |
| `content_hash` | `varchar2` | | ☐ | The SHA-256 of the content of this version; equal for equal content. |
| `content_type` | `varchar2` | | ☐ | The kind of file, such as application/pdf. |
| `date_modified` | `datetime` | | ☐ | When the source system last changed the entry, UTC; for written questions, the day the answer was added. Never the day the document was written. |
| `entity_id` | `varchar2` | | ☑ | The id of the document, such as document:ibabs:gemeente:houten:<id>; stable, and the argument of the functions of the schema Entities. |
| `extraction_quality_score` | `decimal` | | ☐ | The score behind that status. |
| `extraction_quality_status` | `varchar2` | | ☐ | How well the text could be extracted, such as ok or suspect; a scan has no text. |
| `file_name` | `varchar2` | | ☐ | The name of the file. |
| `last_discussed_at` | `datetime` | | ☐ | When it was last discussed in a meeting, UTC. iBabs data before 2025 holds Dutch time marked as UTC, so a late meeting can land on the next day. |
| `meeting_entity_id` | `varchar2` | | ☐ | The meeting at which the document was last discussed; empty for a register document and for an attachment of a motion. |
| `name` | `varchar2` | | ☐ | The name of the document as the source system gives it. |
| `organization_id` | `varchar2` | | ☐ | The organisation, such as organization:nl:gemeente:houten. |
| `original_url` | `varchar2` | | ☐ | Where the source system publishes the file. Part of iBabs refuses it; DocumentPdfById reads the copy of the platform. |
| `page_count` | `int32` | | ☐ | The number of pages the text was extracted from; at most 40. |
| `referenced_by_entity_id` | `varchar2` | | ☐ | What the document belongs to as the platform says it: a meeting, a motion it is attached to, or for a register document the organisation. |
| `schema_version` | `varchar2` | | ☐ | The version of the record format, such as v1alpha1. |
| `seq` | `int64` | | ☑ | The position of the version in the change feed of the source; a newer version has a higher number. |
| `source_key` | `varchar2` | | ☑ | The source, which is also the partition. |
| `source_page_count` | `int32` | | ☐ | The number of pages of the file. |
| `storage_url` | `varchar2` | | ☐ | Where the platform keeps its copy of the file. |
| `supplier` | `varchar2` | | ☑ | The council information system it was read from. |
## Foreign Keys
The values of these columns refer to a row of another table.
| Columns | Referenced Table | Referenced Columns | Guarantee |
|---|---|---|---|
| `meeting_entity_id` | [[Export-Meetings\|Export.Meetings]] | `entity_id` | Declared by the connector, not enforced by the platform |
| `source_key` | [[Catalog-Sources\|Catalog.Sources]] | `source_key` | In words only: The source, which is also the partition. |
## Referenced By
The columns of these tables refer to a row of this table.
| Table | Columns | Guarantee |
|---|---|---|
| [[Export-Motions\|Export.Motions]] | `attachment_entity_id` | Declared by the connector, not enforced by the platform |