| 1 |
# Trivial example Sieve filter. |
| 2 |
# The input data is in input/cities.csv. |
| 3 |
# We sieve out (passthrough) all records where city attr value |
| 4 |
# matches "amsterdam" or "otterlo". |
| 5 |
|
| 6 |
[etl] |
| 7 |
chains = input_csv|attr_value_sieve|output_std, |
| 8 |
input_csv|attr_value_sieve|output_file |
| 9 |
|
| 10 |
[input_csv] |
| 11 |
class = stetl.inputs.fileinput.CsvFileInput |
| 12 |
file_path = input/cities.csv |
| 13 |
output_format = record_array |
| 14 |
|
| 15 |
[attr_value_sieve] |
| 16 |
class = stetl.filters.sieve.AttrValueRecordSieve |
| 17 |
input_format = record_array |
| 18 |
output_format = record_array |
| 19 |
attr_name = city |
| 20 |
attr_values = amsterdam,otterlo |
| 21 |
|
| 22 |
[output_std] |
| 23 |
class = stetl.outputs.standardoutput.StandardOutput |
| 24 |
|
| 25 |
[output_file] |
| 26 |
class = stetl.outputs.fileoutput.FileOutput |
| 27 |
file_path = output/cities_sieved.txt |
| 28 |
|