是否有任何scriptella jruby脚本示例/示例?

时间:2013-06-13 10:48:25

标签: scriptella

我是新的scriptella用户。

是否有任何样本或教程使用jruby 作为脚本语言?

谢谢和问候,

和Manish

在ejboy的suggesstions ==

之后

==更新

  • 在lib。中复制了jruby.jar(1.7.4)。
  • 然而,除了以下例外,scriptella失败了。

2013年6月14日上午9:31:36脚本/bigdisk/work/cougar/code/leopard-monitor/analytics/kpoint_usage/scriptella/scripts/jruby_sample.xml执行失败。

/etl/script[1] failed: keySet
Location: /etl/script[1]
Jun 14, 2013 9:31:36 AM <SEVERE> Scriptella bug report. Submit to issue tracker.
Scriptella version: 1.1
Exception:
scriptella.execution.EtlExecutorException: /etl/script[1] failed: keySet Location: /etl/script[1]
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:190)
    at scriptella.tools.launcher.EtlLauncher.execute(EtlLauncher.java:276)
    at scriptella.tools.launcher.EtlLauncher.launch(EtlLauncher.java:193)
    at scriptella.tools.launcher.EtlLauncher.main(EtlLauncher.java:321)
Caused by: scriptella.core.ExceptionInterceptor$ExecutionException: /etl/script[1] failed: keySet
    at scriptella.core.ExceptionInterceptor.execute(ExceptionInterceptor.java:44)
    at scriptella.core.Session.execute(Session.java:103)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:227)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:183)
    ... 3 more

以下是我的xml文件。

<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
  <description>
    use jruby as scripting language.
  </description>
  <connection id="script-jruby" driver="script" url="out/test-out.csv"> <!-- classpath="path/to/jar:path/to/jar2"> -->
     language=jruby
  </connection>
  <script connection-id="script-jruby">
    puts "Hello world - using jruby"
  </script>
</etl>

1 个答案:

答案 0 :(得分:0)

尝试将language属性设置为jruby,并确保类路径上可以使用所需的jar。您可以将它们复制到<scriptella_home>/lib目录或包含在连接声明中:

<connection id="script" driver="script" classpath="path/to/jar:path/to/jar2">
   language=jruby
</connection>