CSV-backed data table idea

Another example use case: Habit tracking and summaries by sections from daily entries on Obsidian (code) : ObsidianMD

Script author is manually building markdown tables.

There is a CLI tool called csvquery which supports a full range of operations, but does introduce external dependencies.

I wonder how difficult it would be to develop a simple lightweight projection-only DSL for use in ```query``` blocks.

Perhaps similar to LINQ syntax:

```csv
from(path...) 
where(
    colA in(
        date(yesterday), date(today)
    )
)
select(colA, colC:newname) 
```

Would need:

  • tokenizer that can recognize parens
  • parser to convert the tokens into semantics
  • execution engine converting the projection into Node.js calls against the CSV
2 Likes