Skip to content

Commit

Permalink
exer5 check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozodbek47 committed Jan 23, 2024
1 parent bc76456 commit b718f47
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions exercises/exercise5.jv
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,28 @@ pipeline GtfsPipeline {
}

block StopsTextFileInterpreter oftype TextFileInterpreter { encoding: "latin2"; }
block StopsCSVInterpreter oftype CSVInterpreter { enclosing: '"'; } // enclosing: '"';
block StopsCSVInterpreter oftype CSVInterpreter { enclosing: '"'; }

block StopsColumnDeleter oftype ColumnDeleter { delete: [column B, column D, column H, column I, column J, column K, column L,]; }

block StopsTableInterpreter oftype TableInterpreter {
header: false;
header: true;
columns:[
"stop_id" oftype integer,
"stop_name" oftype text,
"stop_lat" oftype coordinatetype,
"stop_lon" oftype coordinatetype,
"zone_id" oftype integer
"zone_id" oftype zonetype
];
}

constraint GeographicCoordinate oftype RangeConstraint { lowerBound: -90; lowerBoundInclusive: true; upperBound: 90; upperBoundInclusive: true;}
valuetype coordinatetype oftype decimal { constraints: [ GeographicCoordinate ]; }

// constraint allowedzone oftype AllowlistConstraint { allowlist: ['2001']; }
// valuetype zonetype oftype integer { constraints: [ allowedzone ]; }
constraint AllowedZone on integer:
value == 2001;

valuetype zonetype oftype integer { constraints: [ AllowedZone ]; }

block StopsLoader oftype SQLiteLoader { table: "stops"; file: "./gtfs.sqlite"; }

Expand Down

0 comments on commit b718f47

Please sign in to comment.