1. Vik Rubenfeld
  2. Valentina Studio
  3. Четверг, Апрель 25 2019, 01:44 AM
  4.  Подписаться через 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?
Комментарий
There are no comments made yet.
Vik Rubenfeld Ответ принят
UPDATE -- it seems like the 3rd bullet point above does work. :)
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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.
Комментарий
There are no comments made yet.
Vik Rubenfeld Ответ принят
Thanks for this great info!
Комментарий
There are no comments made yet.
  • Страница :
  • 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