Dataview Error, Can't see it

Things I have tried

various code

What I’m trying to do

Create a table for a tape catalog

I’m not sure why, but when I add additional columns, besides the first one (“Tape”) which works if i only have that one, I get a dataview error, but I can’t for the life of me figure out why. It seems pretty simple, but something isn’t working.

Here is my YAML


Type: “Tape Log”
Project: “There’s No Place Like You”
Group: “Dallas_Lubbock_080802_1-8”
Tape: “Dallas_Lubbock_080802_01”
Start: “2002-08-08”
End: “2002-08-09”
Tape Sticker Side: “Dallas 8/8/02 - 8/15/02 (1)”
Paper Insert Side: “Dallas 8/8/02 - 8/15/02 (1)”

When my code doesn’t contain any more columns than “Tape” is works, but when I add the addditional columns I get the error below.

TABLE WITHOUT ID link(file.link, Tape) AS "Tape", Group, Start, End
WHERE Type="Tape Log"
SORT Start ASC

Dataview: Error:
– PARSING FAILED --------------------------------------------------

1 | TABLE WITHOUT ID link(file.link, Tape) AS “Tape”, Group, Start, End
| ^
2 | WHERE Type=“Tape Log”
3 | SORT Start ASC

Expected:

variable

I think I figured out that I can’t use the word “Group”-when I changed that it worked!
Some followup questions:

  • For “Tape Sticker Side”: Can one not have spaces between words when calling that data in a column?
  • Is there a clever way to use grouping to help sort this data: I have several tape groups that have a number of tapes within them.
  • Is there a more clever way of doing what I’m doing?

Nice job investigating!
Dataview has an operation called “GROUP BY” and operation names are not case-sensitive so that is why it was confused. Same as if you had a field called “Where”.

  1. Regarding “Tape Sticker Side” - I think YAML is pretty particular about spaces - are you sure those lines can be read properly from your frontmatter? In dataview, fields always have an alternate name that is all-lower-case-spaces-replaced-by-dashes. So if you had an inline field Tape Sticker Side:: "Dallas..." you could add it in your dataview query as TABLE ... Start, End, tape-sticker-side for example. I’m just not sure that works out when the field is YAML. Try and see I guess?

  2. Since you discovered the GROUP BY operation, you could try that on whatever you re-named your “field-formerly-known-as-Group” to… If you do use GROUP BY, you probably want it last in your query lines AND you’ll have to edit all the column data to be rows.Start link(rows.file.link...) etc. instead of what they are now. GROUP BY is odd like that. There is a little bit more information in the dataview documentation.

  3. Figuring out that you could not use the word “Group” was clever!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.