No release in over 3 years
Low commit activity in last 3 years
Embulk filter plugin to external ruby script
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.0
~> 0.7.9
~> 10.0
 Project Readme

embulk-filter-script

Embulk filter plugin to external ruby script.

Gem

Install

embulk gem install embulk-filter-script

Configuration

  • path external ruby script path (string, required)
  • drop_columns drop column names (array)

external ruby script

def filter(record)
  # This method implements the filtering logic
  record
end

Example

filters:
  - type: script
    path: ./script/example.rb
    drop_columns:
      - created_at
      - updated_at

example.rb

def filter(record)
  case record["code"].to_i
  when 100..200
    level = "INFO"
  when 201..300
    level = "WARN"
  else
    level = "ERROR"
  end
  record['message'] = "[" + level + "]" + record['message']

  record
end