1. Vik Rubenfeld
  2. Valentina Studio
  3. Donnerstag, April 25 2019, 01:44 AM
  4.  Abonnieren via E-Mail
I would like to import data to a jsonb field from a csv. I've tried things like:


"stripes":true, "solids":true
"stripes:true", "solids:true"
{"stripes":true, "solids":true}


...etc., but I get an error when trying to import to a jsonb field.

What is the correct format for jsonb data to have in a csv file in order for it to import into Valentina postgres?
Kommentar
There are no comments made yet.
Vik Rubenfeld Akzeptierte Antwort
Thanks for this great info!
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Vik,

It's better to quote the JSON value, internal quotes should be duplicated.

With default settings it will be

"{""stripes"":true, ""solids"":true}"


Also, you can use another symbol for text qualifier, not used in values - then no need to duplicate the quote.
Kommentar
There are no comments made yet.
Vik Rubenfeld Akzeptierte Antwort
UPDATE -- it seems like the 3rd bullet point above does work. :)
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories