Showing Obsidian front matter using Dataview queries

How to use the dataview plugin to display the YAML front matter of Obsidian notes as a table

Showing Obsidian front matter using Dataview queries
Obsidian is a powerful knowledge management tool

In this article, I want to share a cool trick for Obsidian that a friend and I used to display the YAML front matter of a note as a table.

YAML front matter in Obsidian

In Obsidian, we can add YAML front matter to our notes. This enables us to add structure to our notes as metadata. This is very useful and enables various use cases (e.g., automation). I use the front matter extensively in my PKM system.

Here's an example:

I've added a number of keys to my contact notes. These enable me to build a super simple (and useful!) contact management system. It makes it super easy to find the information I need when I need it.

The "problem" is that the front matter is only visible in the edit mode, which is not ideal. Luckily, my friend Alexis helped me build a Dataview query that makes it possible to display the YAML front matter as an inline table.

Dataview query to display the front matter of a note as a table

Here's the dataview query that we've built:

This query first retrieves the contents of the YAML front matter, excludes the "Tags" field (as those are accessible in other ways already), and renders those as a table. The result looks like this in the view mode:

Inline table displaying the YAML front matter

By the way, I've included this query in the "Contact" template of my Obsidian Starter Kit.

That's it for today! ✨

About Sébastien

I am Sébastien Dubois. You can follow me on X 🐦 and on BlueSky 🦋.


I am an author, founder, and coach. I write books and articles about Knowledge Work, Personal Knowledge Management, Note-taking, Lifelong Learning, Personal Organization, and Zen Productivity. I also craft lovely digital products . You can learn more about my projects here.

If you want to follow my work, then become a member.


Ready to get to the next level?

To embark on your Knowledge Management journey, consider investing in resources that will equip you with the tools and strategies you need. Check out the Obsidian Starter Kit and the accompanying video course. It will give you a rock-solid starting point for your note-taking and Knowledge Management efforts.


If you want to take a more holistic approach, then the Knowledge Worker Kit is for you. It covers PKM, but expands into productivity, personal organization, project/task management, and more:

Knowledge Worker Kit and community
Unlock the next level of your career. Stop feeling disorganized, unproductive, or overwhelmed.

If you are in a hurry, then do not hesitate to book a coaching session with me:

Personal Knowledge Management Coaching
Receive personalized coaching to quickly reach your goals