From af140307a025738767e740fea8da8d15e20fb983 Mon Sep 17 00:00:00 2001
From: Bryan Newbold <bnewbold@archive.org>
Date: Wed, 5 Aug 2020 13:10:56 -0700
Subject: grobid+pdftext missing catch-up commands

---
 sql/dump_ungrobid_pdf_petabox.sql | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 sql/dump_ungrobid_pdf_petabox.sql

(limited to 'sql/dump_ungrobid_pdf_petabox.sql')

diff --git a/sql/dump_ungrobid_pdf_petabox.sql b/sql/dump_ungrobid_pdf_petabox.sql
new file mode 100644
index 0000000..f758ec2
--- /dev/null
+++ b/sql/dump_ungrobid_pdf_petabox.sql
@@ -0,0 +1,17 @@
+
+-- Run like:
+--   psql sandcrawler < dump_ungrobid_pdf_petabox.sql
+
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
+
+COPY (
+  SELECT DISTINCT ON (petabox.sha1hex) row_to_json(petabox)
+  FROM petabox
+  WHERE NOT EXISTS (SELECT grobid.sha1hex FROM grobid WHERE petabox.sha1hex = grobid.sha1hex AND grobid.status IS NOT NULL)
+  -- uncomment/comment this to control whether only fatcat files are included
+  AND EXISTS (SELECT fatcat_file.sha1hex FROM fatcat_file WHERE petabox.sha1hex = fatcat_file.sha1hex)
+)
+TO '/grande/snapshots/dump_ungrobided_pdf_petabox.2020-08-04.json'
+WITH NULL '';
+
+ROLLBACK;
-- 
cgit v1.2.3

