Skip to content

Commit

Permalink
Update filter mechanism and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Aug 10, 2023
1 parent 88d290c commit f63f951
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/transformation/TransformDbs.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static void process(final String outputPath, String geoLookupServer) throws File
opener//
.setReceiver(new LineReader())//
.setReceiver(decoder)//
.setReceiver(new Metafix("conf/fix-dbs.fix"))//
.setReceiver(new Metafix("conf/fix-dbs.fix"))// Fix skips all records that have no "inr"
.setReceiver(TransformAll.fixEnriched(geoLookupServer))//
.setReceiver(encodeJson)//
.setReceiver(TransformAll.esBulk())//
Expand Down
2 changes: 1 addition & 1 deletion app/transformation/TransformSigel.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static void process(String startOfUpdates, int intervalSize,
splitFileOpener//
.setReceiver(new XmlDecoder())//
.setReceiver(new PicaXmlHandler())//
.setReceiver(new Metafix("conf/fix-sigel.fix"))//fix also kicks out all records without _id
.setReceiver(new Metafix("conf/fix-sigel.fix")) // Fix skips all records that have no "inr" and "isil"
.setReceiver(TransformAll.fixEnriched(geoLookupServer))//
.setReceiver(encodeJson)//
.setReceiver(TransformAll.esBulk())//
Expand Down
1 change: 1 addition & 0 deletions conf/fix-dbs.fix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ end

vacuum()

# Skip all records that have no "inr"
unless exists("inr")
reject()
end
8 changes: 3 additions & 5 deletions conf/fix-sigel.fix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ replace_all("@dbsId"," ","")
replace_all("isil"," ","")
if any_match("@dbsId","[A-Z]{2}\\d{3}")
copy_field("@dbsId","inr")
else
copy_field("isil","_id")
end

do list(path: "032P","var":"$i")
Expand Down Expand Up @@ -67,10 +65,10 @@ do list(path: "035B","var":"$i")
copy_field("$i.k","email")
end
end

vacuum()


vacuum()

# Skip all records that have no "inr" or "isil"
unless exists("inr")
unless exists("isil")
reject()
Expand Down

0 comments on commit f63f951

Please sign in to comment.