CSV "DBs" examples. Convenient set of CSV files for testing CSV imports and joins in other systems, like csvsql or Base,Kexi import, etc.
  • Makefile 79.4%
  • Shell 20.6%
Find a file
2017-05-14 16:49:37 +02:00
csv_inputs move to csv_inputs 2017-05-14 14:45:08 +02:00
csv_outputs += csv_outputs generated by Makefile csvsql join 2017-05-14 14:46:24 +02:00
screenshots README.md += more screenshots and steps for LibreOffice Base example 2017-05-14 15:17:33 +02:00
.gitignore += .gitignore 2017-05-14 15:18:15 +02:00
csvsql_CDs_join.sh += csvsql_CDs_join.sh # extracted csvsql command to external file to make it more visible 2017-05-14 15:07:33 +02:00
LibreOffice_Base_Example.odb += LibreOffice_Base_Example.odb # + notes and screenshots 2017-05-14 15:09:00 +02:00
LICENSE Initial commit 2017-05-14 14:36:26 +02:00
Makefile += csvsql_CDs_join.sh # extracted csvsql command to external file to make it more visible 2017-05-14 15:07:33 +02:00
README.md README.md/Install += pip install csvkit 2017-05-14 16:49:37 +02:00

csv_dbs_examples

It is CSV "DBs" examples. Purpose is to have convenient set of CSV files for testing CSV imports and joins in other systems, like csvsql or Base,Kexi import, etc. Also to provide "hello world" examples from few systems for convenient overview.

Installation of dependencies

csvsql, csvlook

http://csvkit.readthedocs.io/en/0.9.1/install.html

pip install csvkit

ODS - LibreOffice Base

  • More about LibreOffice Base
  • File assumes you linked csv inputs under : /tmp/csv_dbs_examples/csv_inputs

Inputs

$ csvlook csv_inputs/CDs.csv 
CDTitle ArtistID LocID
CDTitle1 A1 L1
CDTitle2 A1 L2
CDTitle3 A2 L1
CDTitle4 A2 L2
$ csvlook csv_inputs/Artists.csv 
ArtistID Artist
A1 Artist1
A2 Artist2
$ csvlook csv_inputs/Locations.csv 
LocID Location
L1 Location1
L2 Location2

Notes

csvsql

$ csvsql --query 'SELECT CDTitle,Location,Artist FROM CDs JOIN Artists ON CDs.ArtistID=Artists.ArtistID JOIN Locations ON CDs.LocID = Locations.LocID' "$@"

Produces:

CDTitle Location Artist
CDTitle1 Location1 Artist1
CDTitle2 Location2 Artist1
CDTitle3 Location1 Artist2
CDTitle4 Location2 Artist2

Screenshots

LibreOffice Base - imported csv files

LibreOffice Base - Database Wizard - Step 1

LibreOffice Base - Database Wizard - Step 2

LibreOffice Base Tables Example

LibreOffice Base Form Example