pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Softwarelimits <softwarelimits@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: How to import Apache parquet files?
Date: Tue, 5 Nov 2019 17:05:48 +0100
Message-ID: <20191105160548.i6dbennbjapxmnuy@development> (raw)
In-Reply-To: <CALnJc4XX1cc=oDX8SdKwDTAb5grZPx9Zu02f7LwM5OhmrBPFxw@mail.gmail.com>
References: <CALnJc4WZ1EYO29W9wSAP4ZQOf0BTD11ZPsydg422tfKOshufjQ@mail.gmail.com>
	<CAJnEWwnBk1qACWNBN2NkvZ7uewFPCQ2fkLEifT-qQEHLkb8vmg@mail.gmail.com>
	<CALnJc4XX1cc=oDX8SdKwDTAb5grZPx9Zu02f7LwM5OhmrBPFxw@mail.gmail.com>

On Tue, Nov 05, 2019 at 04:21:45PM +0100, Softwarelimits wrote:
>Hi Imre, thanks for the quick response - yes, I found that, but I was not
>sure if it is already production ready - also I would like to use the data
>with the timescale extension, that is why I need a full import.
>

Well, we're not in the position to decide if parquet_fdw is production
ready, that's something you need to ask author of the extension (and
then also judge yourself).

That being said, I think FDW is probably the best way to do this. It's
explicitly designed to work with foreign data, so using it to access
parquet files seems somewhat natural.

The alternative is probably transforming the data into COPY format, and
then load it into Postgres using COPY (either as a file, or stdin).

Which of these options is the right one depends on your requirements.
FDW is more convenient, but row-based and probably significantly less
efficient than COPY. So if you have a lot of these parquet files, I'd
probably use the COPY. But maybe the ability to query the parquet files
directly (with FDW) is useful for you.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (5+ messages)  latest in thread

Message-ID: <20191105160548.i6dbennbjapxmnuy@development>
Permalink:  ../20191105160548.i6dbennbjapxmnuy@development/
Also on:    postgresql.org/message-id/20191105160548.i6dbennbjapxmnuy@development

 · 

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: tomas.vondra@2ndquadrant.com, softwarelimits@gmail.com
  Subject: Re: How to import Apache parquet files?
  In-Reply-To: <20191105160548.i6dbennbjapxmnuy@development>
  References: <CALnJc4WZ1EYO29W9wSAP4ZQOf0BTD11ZPsydg422tfKOshufjQ@mail.gmail.com> <CAJnEWwnBk1qACWNBN2NkvZ7uewFPCQ2fkLEifT-qQEHLkb8vmg@mail.gmail.com> <CALnJc4XX1cc=oDX8SdKwDTAb5grZPx9Zu02f7LwM5OhmrBPFxw@mail.gmail.com> <20191105160548.i6dbennbjapxmnuy@development>

* 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