Closed hansgru closed 9 years ago
I would use the script, jexl or janino drivers to write the logic you need (hammer principle), break your etl process into several scripts that you can run between administrative operations (respect des fonds), or you may just want to re-visit your logic to write to your destinations simultaneously (scriptella doesn't limit you to one target connection at a time).
@seansummers Thanks for your help.
Unfortunately janio
does not seem to work, but using the script
driver seems to work.
Also there's no need to break the scripts even further (they are already broken in 10+ etl.xml
files that group transactions.
I did the following (requires Java 7+), so it might be useful in the FAQ section so that other uses don't need to search:
<connection id="script" driver="script"/>
.... tasks before ...
<script connection-id="script">
java.lang.System.out.println("Try to copy files with Scriptella ....");
java.nio.file.Files.copy(
(new java.io.File("etl/step_3/file_to_copy.db")).toPath(),
(new java.io.File("etl/out/file_to_copy.db")).toPath()
);
</script>
...tasks after...
It is janino
not janio
BTW.
I'm glad that worked, but still wonder why writing directly to both locations in your script wouldn't.
If it's all good, please close this issue.
How to copy files in one of the steps while the
etl.xml
is run?E.g. after a few steps imported some data in the DB (h2), than the DB file needs to be copied somewhere else, and than other further steps need to be done on the original one, than copied again somewhere, etc.
Thank you.