Kiba Ruby 的 ETL 框架

程序名称:Kiba

授权协议: LGPL

操作系统: 跨平台

开发语言: Ruby

Kiba 介绍

Kiba 是一个轻量级的 Ruby 的 ETL 框架。

作业定义 xxx.etl:

# declare a ruby method here, for quick reusable logic
def parse_french_date(date)
  Date.strptime(date, '%d/%m/%Y')
end

# or better, include a ruby file which loads reusable assets
# eg: commonly used sources / destinations / transforms, under unit-test
require_relative 'common'

# declare a pre-processor: a block called before the first row is read
pre_process do
  # do something
end

# declare a source where to take data from (you implement it - see notes below)
source MyCsvSource, 'input.csv'

# declare a row transform to process a given field
transform do |row|
  row[:birth_date] = parse_french_date(row[:birth_date])
  # return to keep in the pipeline
  row
end

# declare another row transform, dismissing rows conditionally by returning nil
transform do |row|
  row[:birth_date].year < 2000 ? row : nil
end

# declare a row transform as a class, which can be tested properly
transform ComplianceCheckTransform, eula: 2015

# before declaring a definition, maybe you'll want to retrieve credentials
config = YAML.load(IO.read('config.yml'))

# declare a destination - like source, you implement it (see below)
destination MyDatabaseDestination, config['my_database']

# declare a post-processor: a block called after all rows are successfully processed
post_process do
  # do something
end

执行作业:bundle exec kiba my-data-processing-script.etl

Kiba 官网

http://www.kiba-etl.org/

相关编程语言

DEFT(数字证据及取证工具箱)是一份定制的Xubuntu自...
DFF (Digital Forensics Framework) 是一个简单但强...
BackTrack是基于Ubuntu的自启动运行光盘,它包含了一...
计算机取证时需要为计算机生成一个位镜像拷贝 , 这需...
CAINE(计算机辅助调查环境)是基于Ubuntu的GNU/Lin...
HackShark Linux是一个基于KDE环境的轻量级的发行版...