agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

Documentation for how to use the CSV import capabilities #232

Closed kozross closed 5 years ago

kozross commented 5 years ago

I'd very much like to do this, but I couldn't find anything explaining how, and the relevant module isn't documented at all.

agentm commented 5 years ago

Oh, the feature is so old, I forgot to document it! I'll write up an import/export manual page. In the meantime, try this simple example session:

:importexample date
TutorialD (master/main): s2:=s where false
TutorialD (master/main): :exportcsv s "/tmp/csv"
TutorialD (master/main): :importcsv "/tmp/csv" s2
TutorialD (master/main): :showexpr s2
┌──────────┬────────┬───────────┬───────────────┐
│city::Text│s#::Text│sname::Text│status::Integer│
├──────────┼────────┼───────────┼───────────────┤
│"Athens"  │"S5"    │"Adams"    │30             │
│"Paris"   │"S2"    │"Jones"    │10             │
│"London"  │"S1"    │"Smith"    │20             │
│"London"  │"S4"    │"Clark"    │20             │
│"Paris"   │"S3"    │"Blake"    │30             │
└──────────┴────────┴───────────┴───────────────┘
agentm commented 5 years ago

I added some notes regarding the CSV import/export feature with examples.