forked from jvalue/made-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
pipeline AutomatedPipeline | ||
|
||
{ | ||
|
||
CSVExtractor -> TextFileInterpretation ; | ||
TextFileInterpretation-> CSVInterpretation ; | ||
CSVInterpretation | ||
-> columndeletion | ||
-> TableInterpretion | ||
-> TreesLoader; | ||
|
||
block CSVExtractor oftype HttpExtractor{ | ||
url: | ||
"https://opendata.rhein-kreis-neuss.de/api/v2/catalog/datasets/stadt-neuss-herbstpflanzung-2023/exports/csv"; | ||
} | ||
|
||
block TextFileInterpretation oftype TextFileInterpreter { } | ||
|
||
block CSVInterpretation oftype CSVInterpreter{ | ||
|
||
delimiter: ';'; | ||
|
||
} | ||
|
||
constraint Geo_constraint oftype RegexConstraint | ||
{ | ||
regex: /^\d{1,3}\.\d+,\s\d{1,3}\.\d+$/; | ||
} | ||
valuetype GEO oftype text | ||
{ | ||
constraints: [Geo_constraint]; | ||
} | ||
|
||
valuetype StadtFurth oftype text{ | ||
constraints:[FurthCity]; | ||
} | ||
|
||
constraint FurthCity oftype AllowlistConstraint{ | ||
allowlist:["Furth-Süd", "Furth-Mitte", "Furth-Nord"]; | ||
} | ||
|
||
block columndeletion oftype ColumnDeleter{ | ||
delete: [column E]; | ||
} | ||
|
||
block TableInterpretion oftype TableInterpreter | ||
{ | ||
header: false; | ||
columns: [ | ||
"lfd_nr" oftype integer, | ||
"stadtteil" oftype StadtFurth, | ||
"standort" oftype text, | ||
"baumart_botanisch" oftype text, | ||
"baumart_deutsch" oftype text, | ||
"id" oftype GEO, | ||
"baumfamilie" oftype text | ||
]; | ||
} | ||
|
||
block TreesLoader oftype SQLiteLoader { | ||
table: "trees"; | ||
file: "./trees.sqlite"; | ||
|
||
} | ||
|
||
|
||
|
||
} |