Get AI summaries of any video or article — Sign up free
How to use the Obsidian Dataview plugin thumbnail

How to use the Obsidian Dataview plugin

Nicole van der Hoeven·
5 min read

Based on Nicole van der Hoeven's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Obsidian Dataview turns vault notes into a database so they can be searched and reshaped using live queries.

Briefing

Obsidian Dataview turns an entire Obsidian vault into a queryable database, letting notes behave less like a static archive and more like structured knowledge that can be searched, filtered, and reshaped on demand. The core promise is practical: instead of building a “second brain” that merely mirrors the first brain’s weaknesses at retrieval and storage, Dataview supports a bottom-up note-taking workflow where raw notes accumulate—then become usable through metadata and live queries.

Dataview is an Obsidian community plugin that converts notes into database records. It can feel daunting because metadata and queries add complexity, but the workflow can stay simple: annotate only what matters, then query only what you need. Installation is straightforward—open Obsidian Settings, disable safe mode if necessary, browse Community Plugins, install Dataview, and enable it.

Using Dataview has two distinct steps. First comes annotation: each note can be labeled with fields that Dataview will index. Those fields can be written directly in the note body using “double colons,” or hidden in YAML front matter using three dashes at the top and bottom. Either way, the parameters are treated the same; the YAML approach just keeps metadata out of the visible preview. In the example, a “person” note for Kieran includes fields like type, location, date_met, tags such as D&D, and a project assignment like Project X.

Second comes querying. Dataview queries live inside code blocks that begin and end with three backticks, and the block is tagged as either dataview (DQL) or dataview JS. Queries start by choosing a view type—lists, tables, tasks, or calendars—then selecting which annotated fields to display. Results can be limited by adding a FROM clause (such as a folder like “Meetings” or a tag filter like #meeting) and narrowed further with WHERE criteria based on the metadata fields. SORT can order results, commonly with file.name ASC for alphabetical ordering.

The transcript walks through how small metadata changes update multiple views automatically. A Project X page can generate a list or table of people assigned to that project using WHERE type is person AND project = "Project X". When a meeting note is created with fields like meeting, project, attendees, and summary, a Dataview table on the Project X page can pull meeting date and summary—either by filtering with type = meeting or by restricting the query to the Meetings folder. A glossary example shows how tags can drive retrieval: a performance testing glossary table lists terms and definitions only when tags include “glossary” and optionally when tags contain “performance.”

Other examples show Dataview’s breadth: a “books I read in 2022” page filters Readwise-imported notes by date (date >= 2022-01-01) and displays rating, title, and date; a tasks view pulls only incomplete tasks tied to Project X; and a calendar view uses file.mtime to show recently modified notes, again filtered by tags like #books. The takeaway is that Dataview helps prevent hoarding by turning scattered notes into a living database of what’s actually been learned—without requiring notes to be perfectly categorized at creation time.

Cornell Notes

Obsidian Dataview converts notes in an Obsidian vault into a database that can be queried. The workflow has two parts: annotate notes with metadata fields (either inline with double colons or in YAML front matter) and then write Dataview queries in code blocks to generate views. Queries can produce lists, tables, tasks, or calendars, and they can be narrowed using FROM filters and WHERE criteria based on the metadata. Because queries are dynamically generated, updating a note’s metadata automatically updates every Dataview view that depends on it. This matters for “bottom-up” note-taking: raw notes can accumulate, then become searchable and usable through metadata-driven retrieval rather than rigid upfront categorization.

Why does Dataview matter for a “second brain” approach, and what problem does it target?

The transcript frames the “second brain” idea as risky because it implies a replica of the first brain, including weak retrieval and storage. Dataview addresses that by turning notes into a database: metadata makes information retrievable, and queries turn scattered notes into usable outputs (lists, tables, tasks, calendars). The goal is to avoid hoarding notes without learning from them by making the accumulated data queryable and therefore actionable.

What are the two steps required to use Dataview effectively?

First, annotate notes by adding fields that Dataview indexes—either inline using “double colons” (e.g., type: person, location: Singapore) or inside YAML front matter (three dashes, then key-value parameters, then three dashes). Second, query those annotated notes using Dataview code blocks delimited by three backticks and labeled as dataview (DQL) or dataview JS. Queries choose a view type (list/table/task/calendar), select displayed fields, and filter results with FROM and WHERE.

How can a query be narrowed so it doesn’t return every note in the vault?

The transcript shows that leaving criteria out causes Dataview to return too many results. The fix is to add WHERE clauses using metadata fields defined during annotation. For example, to list people assigned to Project X, the query uses WHERE type is person AND project = "Project X". Additional narrowing can come from FROM filters, such as FROM "Meetings" to restrict to a folder or FROM #meeting to restrict by tag.

How does Dataview handle updates when metadata changes?

Dataview views are dynamically generated. If a person note (like Alice) later gets updated with project: Project X, the Dataview table on the Project X page updates automatically. That means the query logic stays the same; only the underlying metadata changes, and the results refresh.

What’s the difference between filtering meeting results by type versus by folder?

When building a Project X meetings table, the transcript notes two workable approaches. One is to add an additional criterion like AND type = meeting so only meeting notes appear. The other is to rely on structure: if meeting notes live in a Meetings folder, using FROM "Meetings" restricts results to that folder, preventing person notes from showing up even if they share the same project field.

How do tasks and calendars fit into Dataview’s query types?

Tasks are handled with the task view type, letting queries list checkboxes tied to metadata. The example filters tasks with WHERE project equals project X and not completed, so ticked-off tasks disappear and unticked ones reappear. Calendars use the calendar view type and can rely on file.mtime (modified time) to show when notes were changed; the example then restricts to relevant notes using FROM #books.

Review Questions

  1. What metadata annotation method (inline double colons vs YAML front matter) would you choose if you want metadata hidden from the note preview, and why?
  2. Write a Dataview query conceptually (not necessarily exact syntax) to list all glossary terms whose tags include “performance.” What fields and filters would you need?
  3. How would you prevent a Project X “meetings” table from showing person notes that also have project = "Project X"? Name two filtering strategies mentioned in the transcript.

Key Points

  1. 1

    Obsidian Dataview turns vault notes into a database so they can be searched and reshaped using live queries.

  2. 2

    Use annotation to add metadata fields to notes, either inline with double colons or in YAML front matter to hide parameters from preview.

  3. 3

    Dataview queries run inside triple-backtick code blocks labeled dataview (DQL) or dataview JS, and they generate lists, tables, tasks, or calendars.

  4. 4

    Use WHERE to narrow results based on annotated fields, and use FROM to restrict by folder or tag to avoid overwhelming output.

  5. 5

    Dataview views update automatically when note metadata changes, so you don’t need to rewrite queries after edits.

  6. 6

    Folder structure and metadata both work as filters—for example, meeting tables can be limited by type = meeting or by FROM "Meetings".

  7. 7

    Dataview can support learning workflows like glossaries, reading trackers (e.g., Readwise-imported notes), and task follow-ups without forcing perfect upfront categorization.

Highlights

Dataview’s two-step workflow—annotate notes with fields, then query them—turns a vault into a database rather than a static archive.
Queries are dynamically generated: updating metadata on a note automatically refreshes every Dataview list/table/task/calendar that depends on it.
Meeting retrieval can be made reliable either by filtering with type = meeting or by restricting queries to a Meetings folder via FROM "Meetings".
Glossary building becomes straightforward when tags drive retrieval, such as using contains(tags,"performance") to filter terms.
Calendar views can be driven by file.mtime to surface recently modified notes, then narrowed with tag filters like #books.

Topics

  • Dataview Setup
  • Metadata Annotation
  • Dataview Queries
  • Dynamic Tables
  • Tasks and Calendars

Mentioned