Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iS1LE-0004kT-Tc for pgsql-general@arkaria.postgresql.org; Tue, 05 Nov 2019 16:06:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iS1LD-0005vK-MU for pgsql-general@arkaria.postgresql.org; Tue, 05 Nov 2019 16:05:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iS1LD-0005vD-4L for pgsql-general@lists.postgresql.org; Tue, 05 Nov 2019 16:05:59 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iS1L6-0003tE-1O for pgsql-general@lists.postgresql.org; Tue, 05 Nov 2019 16:05:57 +0000 Received: by mail-wr1-x443.google.com with SMTP id n1so22052536wra.10 for ; Tue, 05 Nov 2019 08:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2EgjZkyzGcBsPXwwlPxUa1I2Xf9n6ivwg408bMR2I5Q=; b=uCLxg72T6kLp1d8toBPFvflli0qwJD+Vyhm5H/nGOPBArbhqzywYBK5myLvgrYMIVw CcaW0IDouF0M/jHpVzObqm1M522lqHSKzEADYMHs3AliyftGUiaTjxLuxIytLHQwgp2r Niu2EfxYsZqsfA2asHTu8Ty5aQd2sNRomWtoRvf7+2czzPJMMmdKwGllvDhfvax0E/mK yEPhL2h8w43d6eYykwSNHhd9pi2Oe0PQCDZkFhxvD2kghebrvIQf8A44RQAhOFTHV6WT OwOgHtp6VxC3d4amqOW5Oj1HJc556zNz1DuEazO9C8+xTiDS6iCU3cO+vQ7RNU2p4MoC nkiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2EgjZkyzGcBsPXwwlPxUa1I2Xf9n6ivwg408bMR2I5Q=; b=lpI9lK0j6q0vqrj8w9lPL0eqjdfckpFqV3I3Z4eexk/RLb/1aCvjC/Kd4z9VPKuhcy kwXZZ6O101f9sMUNn+a3PbBHkXqNSznox+9Op0pMtoIcfFfzTp5EYGkNWtptwF5RrQzd gy/sXnQCcoWiBGsp29XuM8uL5DutwHJNJgusvZzvRP3Tm+IFIRSAjSzzZ2Z8uW714mCT rXa2Q2vH7lEZKLMckPwPPP3e94rafEvjcdI3vW+EA2virDVneGNllOQKQ2UYZdcG+i3D vDPEkBxml/AyLdn28fMo9heSci6OXgJyY1opundPO/vZ0PjdAQ238rchx7LYMw2DMmNN 6A5w== X-Gm-Message-State: APjAAAVzKQDQ0WlpLQOhkWoOEIb2n1kun4oLXqKlcU4OAD9/d5JXE/lf x0lvyxXtG8UYmrsY9bdQ5WO3og== X-Google-Smtp-Source: APXvYqyoc+JX/pM/fKLOkExoS6KVGaVak/9/lQ4R6lWnCJe5/IfkkcYlGPBCoj3LC+WKJRzVq5Qtow== X-Received: by 2002:adf:e74c:: with SMTP id c12mr28234116wrn.133.1572969950405; Tue, 05 Nov 2019 08:05:50 -0800 (PST) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id a206sm29700141wmf.15.2019.11.05.08.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 08:05:49 -0800 (PST) Date: Tue, 5 Nov 2019 17:05:48 +0100 From: Tomas Vondra To: Softwarelimits Cc: "pgsql-generallists.postgresql.org" Subject: Re: How to import Apache parquet files? Message-ID: <20191105160548.i6dbennbjapxmnuy@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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