Skip to main content
Question

JSON into Postgres


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.

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
mark_f wrote:

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
alicedevereux wrote:

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
mark_f wrote:

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
alicedevereux wrote:

yep you are right my build is 15485

Just updated to 15485 and also works for me.

 

 

Glad you got there in the end.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings