aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-25 16:31:22 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-25 16:31:22 -0700
commit08ae9f4c14feab9f9e77cfca8f9dcb17eb8ee78e (patch)
tree99ba040c229906fdf601e5e0b954195d13dc62fe /sql
parent155a4c9918cf052bed7b73165a7a9ed965e69c6e (diff)
downloadsandcrawler-08ae9f4c14feab9f9e77cfca8f9dcb17eb8ee78e.tar.gz
sandcrawler-08ae9f4c14feab9f9e77cfca8f9dcb17eb8ee78e.zip
unextracted PDF job dump command
Diffstat (limited to 'sql')
-rw-r--r--sql/dump_unextracted_pdf.sql16
1 files changed, 16 insertions, 0 deletions
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;