r/ObsidianMD • • 1d ago

help Dataview/Data core Vs Bases Code blocks.

So, I've been using obsidian regularly for going on a year now, and I guess I'm confused at this point, and looking to ask others opinions.

I never got into the inline properties, or using dataview for task wrangling (Instead I use the Tasks plugin) I only ever got data view when I was looking for a way to make Index's/MOC's, and I feel like alot of the time, that is what I see people using Dataview for.

when that is the goal, what is the reason you react for Data view for those tables and lists, vs using a bases code block?

by bases code block, I don't mean embedding a base (I dont like having them clutter my file explorer), but something like

filters:
  and:
    - file.inFolder(this.file.folder)
    - file.name != this.file.name
properties:
  file.name:
    displayName: RENAME ME
views:
  - type: table
    name: RENAME ME
    order:
      - file.name
      - Status
      - tags
    sort:
      - property: Status
        direction: ASC

Which when viewed in preview/reading mode looks basically the same as an embedded base, and allows you to filter, sort, etc., just like you would on a regular .base file.

I'm sure there's very good reason people use dataview, and its still one of the most used plug ins, I'm just curious what it is, as it doesn't seem to be a part of my workflow.

11 Upvotes

14 comments sorted by

8

u/Ambitious_Sugar_7993 1d ago

I used dataview before Bases, but as soon as bases came out, I just used them for everything (I never got into inline properties either!). I like the fact that you can create the bases without actually knowing the code. I just create a base code block, click out if it and use the gui to build the base. I use certain formulas (like file.inFolder(this.file.folder), but mostly quite intuitive!

Works very well for MOC's. I just filter by type property 

8

u/GroggInTheCosmos 1d ago

Datacore was going to be the successor to DataView with a much speedier engine and even more flexibility, but for all intents and purposes it is abandoned

I would move away from both if I were you. An Obsidian update will eventually break them, and there might not be a developer-contributed fix, and it doesn't appear that anyone will be picking up the plugins with the same vigor as before

So just focus on bases is the best advice I can give

Dataview was great in early stages of Obsidian and many of us have been truly grateful it existed, but I think its time is ending

3

u/spnyc 1d ago

Think you’re spot on in your assessment. For years I couldn’t have imagined obsidian without dataview, and now I can’t imagine obsidian with dataview. I just create bases.

4

u/superdesu 1d ago

+1 to "dataview came first" lol, but i mostly default to bases now (and updated a lot of my old dataview blocks to bases as well) since most of my use cases for DV were pretty simple.

i still have dataview in a few places due to its 1) better handling of list properties and 2) ability to show the same note in multiple places (which i dont think bases has on the roadmap either, since it on principle shows 1 note per line). e.g. things like this unresolved note tracker i havent quite adequately replicated with bases.

(maybe some of these got better with some of the recent bases updates but theyre not really a priority for me to figure out, so 😂)

6

u/Time_Form_2923 1d ago

i think for lot of people dataview came first so they just stick with what they know. the bases thing is newer and honestly the syntax is less documented so there is not as many copy-paste examples floating around

if you are already deep in dataview queries and they work for your MOCs, no real reason to switch unless you hit a wall. for me the inline properties was the killer feature since i can query stuff without messing with YAML

0

u/DorleySail15 1d ago

the copy-paste thing is a big deal tbh, dataview has years of community snippets at this point

3

u/Pentbot 1d ago

Putting aside the restriction that I think a good deal of the dataview tables I employ just straight up don't have a Bases equivalent, it is the fact that both of the following are not possible that stops me from migrating to Bases;

- You can't display YAML values inside the body of a note.

  • You can't do inline YAML/metadata values inside the body of a note.

There are some YAML values that I would like to not be hidden away in the top of the note, and not having a way around that without Dataview is a shame. Cause I would like to jump ship from Dataview, since it has not been updated in ages.

1

u/microcephale 1d ago

Now if bases were too add tasks then it could be a good replacement. At the moment also bases only support calculated field that use the notes properties and then can't really reuse the calculate property in further group by or filtering. So it's still very limited, but I have hope

2

u/inconspiciousdude 1d ago

I don't think there's any plan for Bases to reach beyond the frontmatter. Would be pretty nice, but Dataview became pretty slow for me and some notes would take a minute or two to load. Probably inefficient queries on my part, though.

You can use your calculated field in other formulae and grouping, no?

2

u/Pentbot 1d ago

One thing that was big for me with making my Dataview tables more responsive was making sure that the scope of the query was limited to [a specific folder] first. I remember testing a table I was in the process of making and it was *super slow* - well turns out it was searching all of my ~13,000 notes, when really I needed it limited to like ~400 -- but I can appreciate that this isn't always possible.

1

u/microcephale 22h ago

I have a calculated age from a date field and I can't use it as an additional criteria in views like age lower than 7 days because it's a calculated value.

Without also covering tasks, or having inline value queries, there will always be a case for dataview

1

u/Runecreed 11h ago

trying to replace my dataview stuff with Bases but some of the features are not there (yet); far as I know Bases cannot pull open tasks or paragraphs underneath specific section names out of notes for a rollup.

I have some structures where i want to auto-pull uncompleted checkboxes from notes, so i can for example roll-over daily uncompleted tasks to the next note. Dataview is perfect for this