Skip to main content
Question

JSON into Postgres

  • March 2, 2016
  • 8 replies
  • 86 views

Forum|alt.badge.img

Hi All,

I'm trying to import JSON into a postgres table which has a JSON column, Unfortunately I get an error of:

PostgreSQL connection: Column 'data' has unknown type with OID 114, treating as char(80)

Is there a way to increase the default past 80 characters? As the reason its failing to insert to postgres is the JSON isn't valid cause it gets truncated to 80 characters.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

Forum|alt.badge.img

The table within sql has data type of JSON, its FME that doesn't recognise this and then imposes a char(80) on it. So I can't change the length in postgres as there is no length to JSON to set.


Forum|alt.badge.img+2
  • March 2, 2016

Which version of FME desktop?


Forum|alt.badge.img

FME desktop 2015.0 WIN32


Forum|alt.badge.img+2
  • March 2, 2016

I have tried with FME 2016 and it works with a simple example. Then tried with FME 2015.1 and I see the same error. 

PostgreSQL connection: Column 'data' has unknown type with OID 114, treating as char(80)

I used the new AttributeValidator to validate the JSON before writing to the table.


Forum|alt.badge.img

I have tried with FME 2016 and it works with a simple example. Then tried with FME 2015.1 and I see the same error. 

PostgreSQL connection: Column 'data' has unknown type with OID 114, treating as char(80)

I used the new AttributeValidator to validate the JSON before writing to the table.

I've just upgraded my version of FME to 2015.1 and it seems to now work for me. very odd it now doesnt work for you.


Forum|alt.badge.img+2
  • March 2, 2016

I've just upgraded my version of FME to 2015.1 and it seems to now work for me. very odd it now doesnt work for you.

What specific build I'm guessing 15485?

I'm using an older 15480. Must update!


Forum|alt.badge.img

What specific build I'm guessing 15485?

I'm using an older 15480. Must update!

yep you are right my build is 15485


Forum|alt.badge.img+2
  • March 2, 2016

yep you are right my build is 15485

Just updated to 15485 and also works for me.

 

 

Glad you got there in the end.