Master Your Obsidian Vault with the Dataview Query Wizard
If you’re like many Obsidian users, you enjoy the power of Dataview queries but you also know how time consuming it can be to write and tweak them. I’ve spent many hours switching between documentation and testing queries just to get the perfect output. After noticing a lot of discussions on Reddit about Dataview pain points, I decided to attempt solve these issues with a custom GPT tool.
Why This Tool?
Many users have shared their struggles on Reddit:
- Complex Syntax and Extra Effort: Writing even simple Dataview queries often involves repeatedly checking docs and mimicking setups from other users. (See discussion)
- Formatting Issues: Users complain about bullet lists coming out too nested, making the output messy instead of clean lists. (Example here)
- Linked Notes Troubles: Another common frustration is that Dataview sometimes fails to display results when properties contain linked notes rather than plain text. (More info)
I built the Dataview Query Wizard (a custom ChatGPT) to address these issues by harnessing a custom GPT trained on your common query patterns and frustrations.
What does it do?
The custom GPT tool lets you simply describe your query in plain English. No more back-and-forth with documentation or copying examples from others—just type what you need, and the tool generates a ready-to-use Dataview query.
- Natural Language Input: Describe your desired query in everyday language. For example, type:
"Show me a table of all daily notes with the #meeting tag that reference a specific note 'Project X'." - Automatic Query Generation: The tool converts your description into a proper Dataview query, so you can copy and paste it directly into your Obsidian note.
- Instant Troubleshooting: If your query output is not what you expected (e.g., nested bullet issues), the tool also suggests easy fixes, including helpful CSS snippets.
How It Works?
- Input Your Request: Simply type a detailed description of what you want.
Example:- "List all my meeting notes that include the tag #meeting and mention [[Project X]]."
- Generate the Query: The GPT tool uses its internal model—tuned with common Dataview examples and issues—to build a query that fits your setup.
- Apply and Fine-Tune: You can then paste this query into your Obsidian note. If it needs any adjustments (for instance, correcting nested list outputs), you’re guided toward simple modifications and CSS tweaks.
For those curious about the custom GPT, check out the Custom GPT for Obsidian Dataview Query Wizard.
Guidelines to Prompting
- Add information about your notes' frontmatter metadata that is relavant to this query.
- Add information about any inline properties that you want the query to use.
- Describe what you want the dataview to query, filter, sort etc.
- Describe the format in which you want the output to be in - TABLE, LIST, TASKS.
- If the generated dataview query fails, paste the error message back to the gpt and it should be able to improve the query.
- For advanced queries, ask the gpt to use dataviewjs (by defult it uses dataviewjs when it finds necessary)
Examples: Here are some of the queries that I have made on the tool. You can see the interactions.
- How can I list all notes with a rating of 8 or higher?
- Can you show me a table of tasks with a due date this week?
- What's the difference between inline fields and YAML frontmatter in Dataview?
- I want to calculate how many days old each note is—how do I do that?
Using this tool means:
- Less Time Wasting: Spend fewer hours fretting over syntax and more time focusing on your content.
- Reduced Frustration: No more endless searching through documentation—get the query you need fast.
- Enhanced Organization: With well-structured queries, you can better manage your vault and keep your notes seamlessly interlinked.
If you’re tired of the back-and-forth hassle of writing Dataview queries and want to save time, give the Dataview Query Wizard a try. It’s built to ease your workflow and let you focus on what really matters: your ideas and insights.
Happy note-taking!
Note: We'd love to hear your suggestions and feedback to make this custom GPT tool even better—please share your thoughts in the comments!