pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Loading 500m json files to database
Date: Tue, 24 Mar 2020 11:32:55 -0600
Message-ID: <3f30c24a-d5b0-8b20-b626-5a674bb9b2f1@gmail.com> (raw)
In-Reply-To: <SA0PR19MB42555877CA8D229BA3F405ACA4F10@SA0PR19MB4255.namprd19.prod.outlook.com>
References: <1584959088557-0.post@n3.nabble.com>
	<7B61A925-5F3D-421C-949B-77B1EE026168@1nar.com.tr>
	<1468923B-049B-4EE6-A2BD-79650CC04149@n26.com>
	<1585009394522-0.post@n3.nabble.com>
	<SA0PR19MB42555877CA8D229BA3F405ACA4F10@SA0PR19MB4255.namprd19.prod.outlook.com>



On 3/24/20 11:29 AM, Kevin Brannen wrote:
> From: pinker <pinker@onet.eu>
>
>> it's a cloud and no plpythonu extension avaiable unfortunately
>
> You're misunderstanding him. See David's post for an example, but the point was that you can control all of this from an *external* Perl, Python, Bash, whatever program on the command line at the shell.
>
> In pseudo-code, probably fed by a "find" command piping filenames to it:
>
> while more files
> do { read in a file name & add to list } while (list.length < 1000);
> process entire list with \copy commands to 1 psql command
>
> I've left all kinds of checks out of that, but that's the basic thing that you need, implement in whatever scripting language you're comfortable with.
>
> HTH,
> Kevin

Sorry if I missed it, but have we seen the size range of these json files?
> This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.
>
>






view thread (24+ messages)  latest in thread

Message-ID: <3f30c24a-d5b0-8b20-b626-5a674bb9b2f1@gmail.com>
Permalink:  ../3f30c24a-d5b0-8b20-b626-5a674bb9b2f1@gmail.com/
Also on:    postgresql.org/message-id/3f30c24a-d5b0-8b20-b626-5a674bb9b2f1@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: Loading 500m json files to database
  In-Reply-To: <3f30c24a-d5b0-8b20-b626-5a674bb9b2f1@gmail.com>
  References: <1584959088557-0.post@n3.nabble.com> <7B61A925-5F3D-421C-949B-77B1EE026168@1nar.com.tr> <1468923B-049B-4EE6-A2BD-79650CC04149@n26.com> <1585009394522-0.post@n3.nabble.com> <SA0PR19MB42555877CA8D229BA3F405ACA4F10@SA0PR19MB4255.namprd19.prod.outlook.com> <3f30c24a-d5b0-8b20-b626-5a674bb9b2f1@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox