diff options
Diffstat (limited to 'sql/dump_ungrobid_pdf.sql')
| -rw-r--r-- | sql/dump_ungrobid_pdf.sql | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/sql/dump_ungrobid_pdf.sql b/sql/dump_ungrobid_pdf.sql index 3e6d782..e65edd5 100644 --- a/sql/dump_ungrobid_pdf.sql +++ b/sql/dump_ungrobid_pdf.sql @@ -1,15 +1,18 @@  -- Run like: ---   psql sandcrawler < dump_ungrobid_pdf.sql | sort -S 4G | uniq -w 40 | cut -f2 > dump_ungrobid_pdf.2019-09-23.json +--   psql sandcrawler < dump_ungrobid_pdf.sql  BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;  COPY ( -    SELECT cdx.sha1hex, row_to_json(cdx) FROM cdx -    WHERE cdx.mimetype = 'application/pdf' -    AND NOT EXISTS (SELECT grobid.sha1hex FROM grobid WHERE cdx.sha1hex = grobid.sha1hex) +  SELECT DISTINCT ON (cdx.sha1hex) row_to_json(cdx) +  FROM cdx +  WHERE cdx.mimetype = 'application/pdf' +  AND NOT EXISTS (SELECT grobid.sha1hex FROM grobid WHERE cdx.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 cdx.sha1hex = fatcat_file.sha1hex)  ) -TO STDOUT +TO '/grande/snapshots/dump_ungrobided_pdf.fatcat.2020-08-04.json'  WITH NULL '';  ROLLBACK; | 
