diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/dump_regrobid_pdf_petabox.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/dump_regrobid_pdf_petabox.sql b/sql/dump_regrobid_pdf_petabox.sql new file mode 100644 index 0000000..3ca8085 --- /dev/null +++ b/sql/dump_regrobid_pdf_petabox.sql @@ -0,0 +1,15 @@ + +-- Run like: +-- psql sandcrawler < dump_regrobid_pdf_petabox.sql +-- cat dump_regrobid_pdf_petabox.2020-02-03.json | sort -S 4G | uniq -w 40 | cut -f2 > dump_regrobid_pdf_petabox.2020-02-03.uniq.json + +BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE; + +COPY ( + SELECT petabox.sha1hex, row_to_json(petabox) FROM petabox + WHERE EXISTS (SELECT grobid.sha1hex FROM grobid WHERE petabox.sha1hex = grobid.sha1hex AND grobid.grobid_version IS NULL) +) +TO '/grande/snapshots/dump_regrobid_pdf_petabox.2020-02-03.json' +WITH NULL ''; + +ROLLBACK; |