dataview-metadata
Annotate notes with metadata for Dataview queries. Use this skill when setting up metadata in your vault, adding fields to notes, or structuring data for Dataview queries. Covers YAML frontmatter, inline fields, implicit fields, data types, and Obsidian-specific patterns (daily notes, books, projects, tasks).
SKILL.md
| Name | dataview-metadata |
| Description | Annotate notes with metadata for Dataview queries. Use this skill when setting up metadata in your vault, adding fields to notes, or structuring data for Dataview queries. Covers YAML frontmatter, inline fields, implicit fields, data types, and Obsidian-specific patterns (daily notes, books, projects, tasks). |
name: dataview-metadata description: Annotate notes with metadata for Dataview queries. Use this skill when setting up metadata in your vault, adding fields to notes, or structuring data for Dataview queries. Covers YAML frontmatter, inline fields, implicit fields, data types, and Obsidian-specific patterns (daily notes, books, projects, tasks).
Dataview Metadata
Metadata is how Dataview reads your notes. Without it, queries have nothing to work with. This skill covers the three ways to add metadata: frontmatter, inline fields, and built-in implicit fields.
Three Types of Metadata
1. Frontmatter (YAML at top of file)
Frontmatter lives at the very top of your note, between --- markers:
---
author: "Jane Smith"
published: 2024-03-15
rating: 9
tags: [productivity, writing]
---
# My Note
Content goes here...
Use frontmatter for: Page-level metadata that applies to the whole note. Best for structured data like publication dates, authors, ratings, categories.
2. Inline Fields
Inline fields embed metadata within your note content using [key:: value] syntax:
# My Book Review
From [author:: Stephen King], published [published:: 2023-09-12]
I gave this book [rating:: 4.5] stars. Finished [completed:: true].
Use inline fields for: Metadata mixed into your narrative. Best when the data makes sense inline with your writing.
3. Implicit Fields
Dataview automatically extracts certain fields without you doing anything:
- Tags:
#productivity #work→ available astagsfield - Links:
[[Note Title]]→ available asfile.inlinksandfile.outlinks - Tasks:
- [ ] Task text [due:: 2024-03-20]→ available in TASK queries - File properties:
file.name,file.path,file.folder,file.ctime,file.mtime
Use implicit fields for: Data you're already writing. No extra work needed.
Field Names and Data Types
See references/field-reference.md for:
- Field naming rules (spaces, punctuation, case sensitivity)
- All supported data types with examples (dates, durations, links, objects, lists)
- Type conversions and edge cases
Metadata Patterns in Obsidian
Common setups for different note types. See references/obsidian-patterns.md for:
- Daily notes (tracking sleep, mood, habits)
- Book tracking (author, rating, status)
- Project management (status, due dates, assignee)
- Task tracking (priority, due date, completion)
- Recipe collection (ingredients, prep time, tags)
- Learning notes (source, review date, difficulty)
Each pattern shows frontmatter + inline field examples and how to query them.
Quick Start
- Decide what data matters - What do you want to query later?
- Choose where to store it - Frontmatter (structured) or inline (narrative)?
- Name your field - Use lowercase, hyphens for spaces:
book-rating,author-name - Pick a data type - Date, number, text, link, etc.
- Query it - Use the field in a Dataview query
Example:
---
type: book
author: "N.K. Jemisin"
---
# The Broken Earth Series
Started [started:: 2024-01-15], finished [completed:: 2024-03-10].
Gave it [rating:: 5] stars.
Then query:
TABLE author, started, completed, rating
FROM #book
WHERE rating >= 4
Common Gotchas
- Metadata not appearing in queries? Make sure you're using the field name correctly. Dataview auto-normalizes names to lowercase with hyphens.
- Task metadata not working? Task-level fields go
[field:: value]inside the task line itself. - Dates not showing as dates? Use the
date()function in queries, or prefix withdate()when defining. Dataview recognizes2024-03-15format automatically. - Need to query implicit fields? Use
file.*prefix:file.name,file.tags,file.inlinks, etc.