1. Vik Rubenfeld
  2. Valentina Studio
  3. Thursday, April 25 2019, 01:44 AM
  4.  Subscribe via email
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?
Comment
There are no comments made yet.
Vik Rubenfeld Accepted Answer
UPDATE -- it seems like the 3rd bullet point above does work. :)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 1
Sergey Pashkov Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 2
Vik Rubenfeld Accepted Answer
Thanks for this great info!
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 3
  • Page :
  • 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