From 08ae9f4c14feab9f9e77cfca8f9dcb17eb8ee78e Mon Sep 17 00:00:00 2001
From: Bryan Newbold <bnewbold@archive.org>
Date: Thu, 25 Jun 2020 16:31:22 -0700
Subject: unextracted PDF job dump command

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

(limited to 'sql/dump_unextracted_pdf.sql')

diff --git a/sql/dump_unextracted_pdf.sql b/sql/dump_unextracted_pdf.sql
new file mode 100644
index 0000000..4d264b9
--- /dev/null
+++ b/sql/dump_unextracted_pdf.sql
@@ -0,0 +1,16 @@
+
+-- Run like:
+--   psql sandcrawler < dump_unextracted_pdf.sql > dump_unextracted_pdf.2019-09-23.json
+
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
+
+COPY (
+  SELECT row_to_json(cdx)
+  FROM grobid
+  LEFT JOIN cdx ON grobid.sha1hex = cdx.sha1hex
+)
+-- TO '/grande/snapshots/dump_unextracted_pdf.2020-06-25.json';
+TO STDOUT
+WITH NULL '';
+
+ROLLBACK;
-- 
cgit v1.2.3

