pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: pinker <pinker@onet.eu>
To: pgsql-general@postgresql.org
Subject: Re: Loading 500m json files to database
Date: Mon, 23 Mar 2020 17:50:46 -0700
Message-ID: <ea5aa03e-0801-3864-78e1-ed8a56daccb9@aklaver.com> (raw)
In-Reply-To: <1585009394522-0.post@n3.nabble.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>

On 3/23/20 5:23 PM, pinker wrote:
> it's a cloud and no plpythonu extension avaiable unfortunately

I presume Python itself is available, so would it not be possible to 
create a program that concatenates the files into batches and COPY(s) 
that data into Postgres using the Psycopg2 COPY functions:

https://www.psycopg.org/docs/usage.html#using-copy-to-and-copy-from

> 
> 
> 
> --
> Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (24+ messages)  latest in thread

Message-ID: <ea5aa03e-0801-3864-78e1-ed8a56daccb9@aklaver.com>
Permalink:  ../ea5aa03e-0801-3864-78e1-ed8a56daccb9@aklaver.com/
Also on:    postgresql.org/message-id/ea5aa03e-0801-3864-78e1-ed8a56daccb9@aklaver.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: adrian.klaver@aklaver.com, pinker@onet.eu
  Subject: Re: Loading 500m json files to database
  In-Reply-To: <ea5aa03e-0801-3864-78e1-ed8a56daccb9@aklaver.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> <ea5aa03e-0801-3864-78e1-ed8a56daccb9@aklaver.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