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)