---
title: Writing descriptions
description: What to write in dataset, table and column descriptions and in the README, guides and documents, and how long each should be
---

Write what you know about a dataset in the `description` of the dataset, its tables and its columns, and in Markdown files. Descriptions appear as-is in lists and search results, so keep them short and put detailed explanations in Markdown. There are four kinds of Markdown: the dataset's overview (`README.md` at the root), table guides (`<table>.md` next to `<table>.tabledoc.yml`), schema guides (a `README.md` listed in `documents:` under `schemas` in `tabledoc.yml`) and documents that span tables (`documents:` in `tabledoc.yml`).

## Where to write and how long

| Where | What | Length |
|---|---|---|
| Dataset `description` (`tabledoc.yml`) | What the data is, and its source | 1–2 sentences plus 1 sentence on the source |
| Table `description` (`<table>.tabledoc.yml`) | What one row represents, and what is easy to get wrong | A 1-sentence summary, a blank line, then up to 3 caveat bullets |
| Column `description` (`<table>.tabledoc.yml`) | Definition, unit, code system | About one short line |
| `README.md` | Source and license, table list, example SQL, caveats that span several tables | No limit |
| Schema guide | Notes on a schema and SQL that spans its tables | No limit |
| Table guide (`<table>.md`) | SQL examples and caveats for one table | No limit |
| Documents listed in `documents:` | Guides that span schemas | No limit |

Table lists and search results show only the first paragraph of a table's description. Write the summary sentence so a reader can decide from it whether to use the table.

```yaml
description: |-
  Buildings started, floor area and estimated construction cost by municipality and use (annual).

  - City rows and ward rows share the same columns. Summing without filtering counts them twice.
  - Suppressed values are NULL.
```

## The rule: write it where it is true

Pick the smallest thing your sentence is true of.

| The sentence is true of | Where it goes |
|---|---|
| One column | that column's `description` |
| One table | that table's `description` |
| More than one table | the caveats section of `README.md` |
| What people call this dataset | `keywords` |
| Something you can run as SQL | the guide of that table or schema ([Where files go](#where-files-go)) |

Once it is written in the smaller place, do not repeat it higher up. Two copies drift apart when only one gets fixed.

## Fix pitfalls in the data first

Before writing a caveat, check whether the shape of the tables or columns can prevent the mistake.

- Rows of different grain in one table → split the table
- Only a 5-digit code → also provide the 6-digit local government code
- Values for different years side by side → tell them apart by column name

Keep in the description only what comes from the source data and cannot be changed, such as suppression or coverage.

## What does not go in a description

- Validation numbers ("matches the national total", "0 mismatches"): put them in dbt tests
- Full license text: use `licenses` and the source and license section of `README.md`
- Processing or build steps: maintainer-only procedures go in `CONTRIBUTING.md`, which is not listed in `documents:`
- Runnable SQL: put it in a guide or a document

## Dataset overview layout (README.md)

`README.md` appears on the dataset page. GitHub shows it at the top of the repository too. Using this order makes it read like other datasets:

1. `# Dataset name` and 1–2 sentences on what the data is
2. `## Source and license`: links to the sources and their terms of use
3. `## Tables`: table name, contents and row count, linking to each table's guide
4. `## Usage`: SQL examples that run as-is
5. `## Caveats`: caveats that span several tables

Write the columns, grain and caveats of each table in its guide.

## Where files go

Describe a table in `<table>.tabledoc.yml` and write its guide in `<table>.md` with the same name; the file's name and place say which table they are for. When you build with dbt, put them next to the model's `.sql` ([When you build with dbt](/en/publish#when-you-build-with-dbt)). Other documents can be anywhere; where they are listed in `documents:` says what each one describes.

In the version, each folder is one thing described: the root is the dataset, `<schema>/` a schema, and `<schema>/<table>/` a table. Each folder's `README.md` describes it, and the other Markdown files in the same folder are its related documents. tabledoc places your files there:

| What you write | Describes | Where it goes in the version | Shown on |
|---|---|---|---|
| `README.md` at the root | The dataset | `README.md` | The dataset page |
| Files listed in `documents:` of `tabledoc.yml` | The dataset | The root | The dataset's related documents |
| A `README.md` listed in `documents:` under `schemas` | A schema | `<schema>/README.md` | The schema page |
| `<table>.md` | A table | `<schema>/<table>/README.md` | The table's "Guide" tab |
| Images and other files a Markdown file links to | | The same path as in your repository | Inside the Markdown that links to them |

```text
README.md                                   # the dataset's overview
tabledoc.yml
.dbtignore                                  # lists *.tabledoc.yml
docs/
  catalog.md                                # a guide that spans schemas (listed in documents:)
  census/README.md                          # describes the census schema (listed in documents: under schemas)
models/census/census_municipality.sql
models/census/census_municipality.tabledoc.yml  # describes census.census_municipality
models/census/census_municipality.md        # the guide of census.census_municipality
```

In this example, `docs/catalog.md` goes to `catalog.md`, `docs/census/README.md` to `census/README.md`, and `census_municipality.md` to `census/census_municipality/README.md`.

- The "Documents" tab lists the files in the version in their folders
- Do not list the columns in a table guide. Define each column in its `description`; the table page shows them in the column list
- Link to other Markdown files with relative paths in your repository (for example `[Population by municipality](../models/census/census_municipality.md)`). They open as written on GitHub, and tabledoc rewrites them to match where the files go in the version
- When two files would go to the same place in the version (two files of the same name in `documents:`, for example), `tabledoc load` reports an error

## Column names and titles

How to name columns and choose their `title` is in [Dataset conventions](/en/publish/conventions#column-names).

## keywords

`keywords` feeds the search index. Put in the words that classify the dataset **and the other names people call it by**, so someone who does not know the official name can still find it.

```yaml
keywords: [statistics, population, society, e-Stat, SSDS, 政府統計]
```

Words specific to one table belong in that table's own `keywords`, not the dataset's.

## Before you stop

- Is the first paragraph of each table description one sentence that tells a reader whether to use the table?
- Could this sentence be said about something smaller than where you put it?
- Is the same thing written in two places?
- Could the shape of a table or column prevent the mistake instead of a caveat?
- Did SQL, validation numbers or processing steps end up in a description?
- Are the other names people use in `keywords`?
- Is any new column an abbreviation listed in `aliases` in `data_elements.csv`?
