snakano / embulk-filter-script Goto Github PK
View Code? Open in Web Editor NEWEmbulk filter plugin to external ruby script
License: MIT License
Embulk filter plugin to external ruby script
License: MIT License
We cannot detect successful or failed result by exit status code.
Let's call test.rb
from embulk_script.yml
but test.rb
does not exist.
It also get same result if it has internal script error.
in:
type: file
# anything ok
filters:
- type: script
path: ./test.rb
out:
type: stdout
# run script, then error
$ embulk run embulk_script.yml
# check exit status code. It should be 1
$ echo $?
0
ref. http://itpro.nikkeibp.co.jp/article/COLUMN/20060228/231028/
$ embulk run embulk_script.yml
2017-09-22 13:26:50.701 +0900: Embulk v0.8.29
2017-09-22 13:26:52.969 +0900 [INFO] (0001:transaction): Loaded plugin embulk-filter-script (0.0.1)
2017-09-22 13:26:52.997 +0900 [INFO] (0001:transaction): Listing local files at directory 'csv' filtering filename by prefix 'test'
2017-09-22 13:26:52.999 +0900 [INFO] (0001:transaction): "follow_symlinks" is set false. Note that symbolic links to directories are skipped.
2017-09-22 13:26:53.009 +0900 [INFO] (0001:transaction): Loading files [csv/test.csv]
2017-09-22 13:26:53.099 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=1 / tasks=1
2017-09-22 13:26:53.108 +0900 [INFO] (0001:transaction): {done: 0 / 1, running: 0}
2017-09-22 13:26:53.180 +0900 [INFO] (0001:transaction): {done: 1 / 1, running: 0}
org.embulk.exec.PartialExecutionException: org.jruby.exceptions.RaiseException: (TypeError) exception class/object expected
at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:375)
at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:607)
at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:391)
at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:387)
at org.embulk.spi.Exec.doWith(Exec.java:25)
at org.embulk.exec.BulkLoader.run(BulkLoader.java:387)
at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:180)
at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:330)
at org.embulk.EmbulkRunner.run(EmbulkRunner.java:173)
at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:472)
at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:100)
at org.embulk.cli.EmbulkBundle.checkBundleWithEmbulkVersion(EmbulkBundle.java:42)
at org.embulk.cli.EmbulkBundle.checkBundle(EmbulkBundle.java:15)
at org.embulk.cli.Main.main(Main.java:26)
Caused by: org.jruby.exceptions.RaiseException: (TypeError) exception class/object expected
at RUBY.load_script_file(/Users/y-ken/.embulk/jruby/2.3.0/gems/embulk-filter-script-0.0.1/lib/embulk/filter/script.rb:53)
at RUBY.initialize(/Users/y-ken/.embulk/jruby/2.3.0/gems/embulk-filter-script-0.0.1/lib/embulk/filter/script.rb:30)
at RUBY.open(/Users/y-ken/bin/embulk!/embulk/filter_plugin.rb:64)
Error: org.jruby.exceptions.RaiseException: (TypeError) exception class/object expected
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.