Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I am migrating streams to postgres and I have some columns which contain infinity values. I changed the schema in postgres to double precision, which does allow inifinity values. However, I get the error "JSON does not allow non-finite numbers." when I try to move my stream into here and it has an infinity value. How do I migrate a stream with inifinity for some values into postgres?
Solved! Go to Solution.
This is a case where you'll need to use the <<>> brackets around your SQL command inputs instead of the [[ ]] square brackets. Ex:
insert into myTable (uid, value1, value2) VALUES
([[uid]], <<numberValue1>>, <<numberValue2>>)
numberValue1 and numberValue2 should then be STRING inputs. Now you'll be able to use the "Infinity" keyword that works with the postgresql database.
-Nick
Hi,
There was a similar question before - "JSON does not allow non-finite numbers for infotable creation": https://community.ptc.com/t5/ThingWorx-Developers/JSON-does-not-allow-non-finite-numbers-for-infotable-creation/td-p/760542
This is a case where you'll need to use the <<>> brackets around your SQL command inputs instead of the [[ ]] square brackets. Ex:
insert into myTable (uid, value1, value2) VALUES
([[uid]], <<numberValue1>>, <<numberValue2>>)
numberValue1 and numberValue2 should then be STRING inputs. Now you'll be able to use the "Infinity" keyword that works with the postgresql database.
-Nick