Re: Should I use JSON? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Should I use JSON?
Date
Msg-id CAKFQuwbWTQL-tycmzH-0=9iC1oTyuMu0gZPO=xw=ciA=7fNapQ@mail.gmail.com
Whole thread Raw
In response to Should I use JSON?  (stan <stanb@panix.com>)
List pgsql-general
On Thu, May 21, 2020 at 8:37 AM stan <stanb@panix.com> wrote:
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?

The simplest thing that works is usually a good starting point.

I consider it a requirement that I can get to the original data as supplied by the vendor.  So, if you are capturing that elsewhere, going directly to structured tables is sufficient.  If you don't have any other place where that gets saved I would save it to a table first then convert it to the final structured tables.

My current setup is using "jq" to perform an intermediate transform of the source json to table-specific files and then using psql and jsonb_to_record insert the json data into the tables.

David J.

pgsql-general by date:

Previous
From: Israel Brewster
Date:
Subject: Re: Table partitioning for cloud service?
Next
From: Adrian Klaver
Date:
Subject: Re: Table partitioning for cloud service?