Skip to content

Commit

Permalink
docker stetl example
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Apr 21, 2016
1 parent ca3886c commit f77e1d9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docker/stetl/test/1_copystd/etl.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Trivial example of an ETL Chain that just copies a file to standard output.

[etl]
chains = input_xml_file|output_std

[input_xml_file]
class = inputs.fileinput.XmlFileInput
file_path = input/cities.xml

[output_std]
class = outputs.standardoutput.StandardXmlOutput
8 changes: 8 additions & 0 deletions docker/stetl/test/1_copystd/etl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
#
# ETL for copying a file to standard output.
#
# Shortcut to call Stetl main.py with etl config.
#
stetl -c etl.cfg

18 changes: 18 additions & 0 deletions docker/stetl/test/1_copystd/input/cities.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='utf-8'?>
<cities>
<city>
<name>Amsterdam</name>
<lat>52.4</lat>
<lon>4.9</lon>
</city>
<city>
<name>Bonn</name>
<lat>50.7</lat>
<lon>7.1</lon>
</city>
<city>
<name>Rome</name>
<lat>41.9</lat>
<lon>12.5</lon>
</city>
</cities>

0 comments on commit f77e1d9

Please sign in to comment.