-
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.
Support strapi export data in rppd-to-lobid workflows (RPB-59)
- Loading branch information
Showing
3 changed files
with
30 additions
and
6 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
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 |
---|---|---|
@@ -1,11 +1,21 @@ | ||
default outfile = "conf/output/bulk/rppd/bulk-rppd-${i}.jsonl"; // lobid-gnd expects *.jsonl suffix | ||
"conf/output/output-rppd-strapi.ndjson" | ||
// Defaults, use Allegro data: | ||
// sbt "runMain rpb.ETL conf/rppd-to-strapi.flux IN_FILE=RPB-Export_HBZ_Bio.txt OUT_FILE=output-rppd-strapi.ndjson" | ||
// sbt "runMain rpb.ETL conf/rppd-to-lobid.flux" | ||
|
||
// To use Strapi export data: | ||
// zgrep -a '"type":"api::person.person"' conf/strapi-export.tar.gz > conf/output/rppd-export.json | ||
// sbt "runMain rpb.ETL conf/rppd-to-lobid.flux IN_FILE=rppd-export.json RECORD_PATH=data" | ||
|
||
default IN_FILE = "output-rppd-strapi.ndjson"; // pass e.g. OUT_FILE=output-rppd-export.ndjson | ||
default RECORD_PATH = ""; // pass e.g. RECORD_PATH=data | ||
default OUT_FILE = "conf/output/bulk/rppd/bulk-rppd-${i}.jsonl"; // lobid-gnd expects *.jsonl suffix | ||
"conf/output/" + IN_FILE | ||
| open-file | ||
| as-lines | ||
| decode-json | ||
| decode-json(recordPath=RECORD_PATH) | ||
| fix(FLUX_DIR + "rppd-to-lobid.fix") | ||
| batch-reset(batchsize="1000") | ||
| encode-json(prettyPrinting="false") | ||
| json-to-elasticsearch-bulk(idkey="id", type="authority", index="gnd-rppd-test") | ||
| write(outfile) | ||
| write(OUT_FILE) | ||
; |
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