# Write a data dictionary for a table or dataset

Produces clear column-level documentation with definitions, types, allowed values, grain, and known caveats so others can use the data safely.

- Topic: Data & Analysis
- Framework: RTF
- Level: Standard
- Tags: Data & Analytics, Write, Analyze, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/write-a-data-dictionary-for-a-table-or-dataset

## Prompt

```text
Write a data dictionary for a table or dataset so other people can use it without asking me.

**Table/dataset name and purpose:** [e.g. "analytics.fct_orders - one row per order line"]
**Schema:** [PASTE column names and data types, or a CREATE TABLE statement]
**Sample rows:** [PASTE 5-20 rows, with sensitive values masked]
**How it is built:** [source systems, refresh schedule, key transformations - or "unknown"]
**Who will use it:** [analysts, business users in a BI tool, data scientists]

Produce:
1. **Overview:** what one row represents (grain), primary key, refresh frequency, owner [ADD], and the main use cases.
2. **Column table:** Column | Type | Plain-English definition | Example value | Allowed values or range | Nullable and what null means | Notes.
3. **Relationships:** how it joins to other tables, on which keys, and the join cardinality (one-to-one, one-to-many).
4. **Gotchas:** fields that are commonly misused, look similar but differ, contain test or internal records, or change meaning over time.
5. **Example questions** this table can and cannot answer.

Rules:
- Infer definitions from names and sample values, but mark anything you are guessing as [CONFIRM] rather than stating it as fact.
- Flag columns that look like personal or sensitive data.
- Keep definitions short and free of jargon so a business user can read them.
```

## What to fill in

- e.g. "analytics.fct_orders - one row per order line"
- PASTE 5-20 rows, with sensitive values masked
- analysts, business users in a BI tool, data scientists
- ADD
- CONFIRM

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
