Is there any way I can pass variables to scriptella e.g. environment or -D parameter?

StackOverflow https://stackoverflow.com/questions/17208427

  •  01-06-2022
  •  | 
  •  

Вопрос

I need to invoke same xmls with slight variation in certain parameters. I thought of writing etl.properties, but then I realize I have to write the properties file name in the xml and that is not what I want.

Ideally I was looking for to pass parameters to Scriptella using command line. Apparently I could not find it in any document.

Any ideas?

Это было полезно?

Решение

You can directly use a Java launcher to pass system properties:

java -jar -Dproperty=value scriptella.jar [etl_file_name]

Or an alternative launching option if multiple jars needed on the classpath. (This is rarely necessary because jars can be added in the connection declaration):

java -Dproperty=value -cp scriptella.jar:additiona_jars.jar scriptella.tools.launcher.EtlLauncher [etl_file_name]
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top