Scriptella Shell driver is available for early testing

72 views
Skip to first unread message

Fyodor Kupolov

unread,
Jan 31, 2020, 2:22:34 PM1/31/20
to Scriptella ETL
Hi All,

I've just uploaded a 1.3-snapshot of Scriptella artifacts to Sonatype repository. It introduces a new driver for running shell scripts - https://github.com/scriptella/scriptella-etl/issues/32.

The idea is simple. The query works by executing a shell script and exporting its output as a set of rows,
each row representing a line in the output.
Script element works by sending output of the script to stdout or resource specified by the URL connection parameter. Example:

    <!-- The shell script of the query element produces 2 lines. They are consumed by the inner script element
    which is printing every line of the consumed row prepended with "Exported" prefix. -->
    <query connection-id="in">
        echo Line${1}
        echo Line2
        <script connection-id="out">
            echo Exported $row
        </script>
    </query>

It also provides limited abstraction from the operating system shell environment by means of <dialect> element:

<script connection-id="in">
<dialect name=".*win.*">
Echo Running Windows
</dialect>
<dialect name=".*linux.*">
echo Running Linux/Unix
</dialect>
<dialect name=".*mac.*">
echo Running Mac OS
</dialect>
</script>


It is inspired by the driver suggested in the early days of Scriptella, but the actual implementation got lost due to javaforge shutdown. 
One of the immediate use-cases - it will serve as a replacement for the mail driver, which is going to be removed in 1.3 due to compatibility problems with JDK11.
But there are many more usages for shell scripts. 

Connection declaration:
<connection id="out" driver="shell" />



Lucie

unread,
Jun 11, 2020, 1:10:20 AM6/11/20
to Scriptella ETL
It's a bit late, but want to say a big THANK YOU for continuing working on this wonderful tool.  This is one of the best tools I've discovered, and I use it daily for the 10+ years. You don't know how much time it has saved me.  I often have to aggregate data from different sources: text, csv, multiple databases, with complicated logics. The ability to be able to call a programming language like Python or Java allows me to do almost anything I want in Scriptella. Nothing fancy - I just that a tool that I can invoke from the command line, run via a cron job, no drag-and-drop GUI required.  Scriptella is exactly what I need for many of my jobs.

Thank you!

Fyodor Kupolov

unread,
Jul 20, 2020, 6:40:41 PM7/20/20
to Scriptella ETL
Thank you, Lucie!
Reply all
Reply to author
Forward
0 new messages