项目作者: diegogaulke

项目描述 :
Golang TXT ETL example
高级语言: Go
项目地址: git://github.com/diegogaulke/etl-txt.git
创建时间: 2018-12-08T17:45:21Z
项目社区:https://github.com/diegogaulke/etl-txt

开源协议:

下载


Golang TXT ETL example

This is an example on how to extract information from a text file, transform and load it into some datasource.

Information is extracted line by line using regex expression for each type of file defined by env vars (see below).

There are two implemented entities, debt and client. You can implement your own adding new extractors, transformers and loaders that supports your file.

The default loader method is to print extracted and transformed information.

Build

dep ensure

go build

Run…

Set env vars FILENAME and FILE_TYPE

export FILE_TYPE=debt

export FILENAME=debts

./etl-txt