Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

embulk-filter-eval

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embulk-filter-eval

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Eval filter plugin for Embulk

Evaluate the row element by ruby code

Overview

  • Plugin type: filter

Configuration

  • eval_columns: (array)
    • The ruby code to be evaluated for each element
  • out_columns: (array)
    • The column to be output from the input columns

Example

$ embulk example
$ embulk guess embulk-example/example.yml -o config.yml
$ embulk preview config.yml

+---------+--------------+-------------------------+-------------------------+----------------------------+
| id:long | account:long |          time:timestamp |      purchase:timestamp |             comment:string |
+---------+--------------+-------------------------+-------------------------+----------------------------+
|       1 |       32,864 | 2015-01-27 19:23:49 UTC | 2015-01-27 00:00:00 UTC |                     embulk |
|       2 |       14,824 | 2015-01-27 19:01:23 UTC | 2015-01-27 00:00:00 UTC |               embulk jruby |
|       3 |       27,559 | 2015-01-28 02:20:02 UTC | 2015-01-28 00:00:00 UTC | Embulk "csv" parser plugin |
|       4 |       11,270 | 2015-01-29 11:54:36 UTC | 2015-01-29 00:00:00 UTC |                       NULL |
+---------+--------------+-------------------------+-------------------------+----------------------------+

config.yml as follows

filters:
  - type: eval
    eval_columns:
      - id: value + 1
      - account:
      - time: Time.now
      - comment: "'Evil is Evil! ' + value"

value is an element of the column.
Such as sample, output will be this.

+---------+--------------+-----------------------------+-------------------------+------------------------------------------+
| id:long | account:long |              time:timestamp |      purchase:timestamp |                           comment:string |
+---------+--------------+-----------------------------+-------------------------+------------------------------------------+
|       2 |       32,864 | 2015-03-13 13:20:18.753 UTC | 2015-01-27 00:00:00 UTC |                     Evil is Evil! embulk |
|       3 |       14,824 | 2015-03-13 13:20:18.754 UTC | 2015-01-27 00:00:00 UTC |               Evil is Evil! embulk jruby |
|       4 |       27,559 | 2015-03-13 13:20:18.755 UTC | 2015-01-28 00:00:00 UTC | Evil is Evil! Embulk "csv" parser plugin |
|       5 |       11,270 | 2015-03-13 13:20:18.756 UTC | 2015-01-29 00:00:00 UTC |                       Evil is Evil! NULL |
+---------+--------------+-----------------------------+-------------------------+------------------------------------------+

Build

$ rake

FAQs

Package last updated on 15 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc