Last active
August 29, 2015 14:20
-
-
Save seansummers/1a5514557c8633881ea8 to your computer and use it in GitHub Desktop.
JEXL looping with Scriptella
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> | |
<etl> | |
<description>JEXL looping</description> | |
<properties><include href="etl.properties"/></properties> | |
<connection id="jexl" driver="jexl"/> | |
<connection id="sql" url="$url"/> | |
<query connection-id="jexl"> | |
fileDir = new('java.io.File', '.' + class:forName('java.io.File').separator + etl.getParameter('directory')).getCanonicalFile(); | |
if (fileDir.isDirectory() eq true) | |
for (sqlFile : fileDir.listFiles()) | |
query.next(); | |
<script connection-id="sql"> | |
USE [${db}]; | |
<include href="$sqlFile"/> | |
</script> | |
</query> | |
</etl> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment