csvq

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2017 License: MIT Imports: 4 Imported by: 0

README

csvq

SQL like query language for csv

Build Status codecov

Install

Binary
  1. Download an archive file from release page.
  2. Extract the downloaded archive and add a binary file in it to your path.
Build from source
  1. Install Go. (ref. Getting Started - The Go Programming Language)
  2. $ go get -u github.com/mithrandie/csvq

Usage

# Simple query
$ csvq "select id, name from user.csv"
$ csvq "select id, name from user"

# Specify data delimiter as tab character
$ csvq -d "\t" "select count(*) from user.csv"

# Load from another directory
$ csvq "select id, name from `/path/to/user.csv`"
$ csvq -r /path/to "select user.id, user.name, country.name from user.csv natural join country.csv"

# Load no-header-csv
$ csvq --no-header "select c1, c2 from user.csv"

# Output in JSON format
$ csvq write -f json "select integer(id), name from user.csv"

# Output to a file
$ csvq write -o new_user.csv "select id, name from user"

# Show help
$ csvq -h

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lib
cmd
csv

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL