Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbnLe-0000cQ-Gs for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 15:43:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbnLc-000468-Ok for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 15:43:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbnLb-00045M-2e for pgsql-general@lists.postgresql.org; Thu, 21 May 2020 15:43:04 +0000 Received: from [64.147.123.25] (helo=wout2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbnLU-0000uf-9R for pgsql-general@postgresql.org; Thu, 21 May 2020 15:43:02 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id A13D7F55; Thu, 21 May 2020 11:42:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 21 May 2020 11:42:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=5 zj2/nYOAj9DEnwVQ8vyD4HDd4/5z5m7uP5tfToOQ7s=; b=EL2cUNapuTUpOQOon f1yvAYWC/mDvdwE+YdWxEZ29YXDMaDGU5JlKZ15gWpCQJ4v0egp7QPu+xiReYEsr GPqg9AYtSCxMrgC+K4xdN/ugu4aoz9o+mfuIY0NqVyG4aHYxMvbIxQyrcKiIkejp 0ekhAVVLDk4br20ke64qMFrRyGHsV1I51nvpahKxURvAry1Al3+iCH2m/irge3n8 J9FJSjHXM3MYhhDS+TJcfLtzqJ57ow/6thqglu7EbEbZzPdOckrhkwaIuwF8shqm EysdEvkjByAzL4OxbR2BGLehFr/gd6KBdCoEsckFXRaHrXRf5FeKw50+lXhv3eEC SQZdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=5zj2/nYOAj9DEnwVQ8vyD4HDd4/5z5m7uP5tfToOQ 7s=; b=cIadieZXjXDfIxPIRp5jQr9dZR00+X7nfuQpaiHrTzGPYaeSk0tJ7S0hX IEupPcrKdFX5fGk6hf2tzbPfsK35GiVYy0IKku5ChXNTiMRvjGais0wBVexKFZlq 6pDfbYZKpauD1fILfFExr7N0wY+9zZtI1YV2LB2OKLpibn8KFQoBgHQydhrxD/WY cUUNAaylvIzlhr56pFwa5ceSijNvnSSirmhUWYVPkvx5s6C7/x0n3TjTNypNai5U +f4ZsC4gTmozd4n6bFhKLbD2d/YFFi6hV51e2PDZJHFnyBsMLsgEgt7aLQqh2X7L WuPzKr6ESX4lv+eTugb+SasXkdAbA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduuddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecukfhppeejhedr udejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 591BC3066486; Thu, 21 May 2020 11:42:43 -0400 (EDT) Subject: Re: Should I use JSON? To: stan , pgsql-general@postgresql.org References: <20200521153742.GA2989@panix.com> From: Adrian Klaver Message-ID: Date: Thu, 21 May 2020 08:42:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200521153742.GA2989@panix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/21/20 8:37 AM, stan wrote: > Worming on a small project, and have been doing a lot of Perl scripting to > parse various types of files to populate the database. Now I need to get > data from a cloud services provider (time-keeping). They have a REST API > that returns data in a JSOSN format. > > So here is the question, should I just manually parse this data, as I have > been doing to insert into appropriate entities into the database? Or should I > insert the JSON data, and use some queries in the database to populate my > tables from the JSON tables? > I use Python for this sort of thing. A JSON array of objects maps so nicely to a Python list of dicts that I just do the parsing in Python and INSERT the parsed data into the table. > -- Adrian Klaver adrian.klaver@aklaver.com