/petl

A Pipeline ETL process and receive data from pipe in Golang

Primary LanguageGo

PETL: A Pipeline ETL process and receive data from pipe in Golang

GoDoc Build Status

Installation and Usage

Install

go get github.com/kkdai/petl

Usage

func main() {
	ret := PipeProcess(Extract("a  s", " smm", "sss"), TransformRemoveSpace, TransformRemoveSpace)
	log.Println("ret:", <-ret) //"as"
	log.Println("ret2:", <-ret) //"smm"
}

Install Console App

go get github.com/kkdai/petl/petl_cli

Usage

Use pipeline for pipe string

//Remove all space in output
cat somefile.txt | petl_cli pipeline="r"

//Make upper case
cat somefile.txt | petl_cli pipeline="u"

//Make lower case 
cat somefile.txt | petl_cli pipeline="l"

//Pipeline it
//Will make lower case first then upper case, final remove all space.
cat somefile.txt | petl_cli pipeline="lur"

Inspired By

Project52

It is one of my project 52.

License

etcd is under the Apache 2.0 license. See the LICENSE file for details.