Issue with DSO - PostgreSQL Unique ID Field


Version 12.2.19

We have a DSO with our PostgreSQL DB, and in one of the tables (named transactions) a field named Transaction_Id (integer) which is 19 Characters and is completely unique in the DB.

When it gets to SF through the DSO this id’s last 3 digits are always rounded to 000 but in DB they are ending in 001, 002, 003

If I reduce field to be 17 or less Digits all work fine. 

And the problem is now that skuid sees those are not unique, it kind of skips transactions and creates me all other sort of data issues

I had first spoken to Rob about this, and he’s the one that explained the duplicate issue. But been investigating since, and found the culprit!

Can anyone please help with this very weird issue?

Thank you

Hi David, sorry for the delay here.

It sounds like you’re using Skuid’s data source object to handle the Postgres-Salesforce connection, correct?

I’m working on reproducing this scenario in one of our environments and will let you know what I discover.

Hey Anna,

No worries, in the mean time we changed that field to use a mix of letter and numbers and reduces length and now works fine.

But yes we use SKUID DSO to handle connections with our DB on PostgreSQL

But a fix may be nice for other users or possibly other future use for us

Thank you for following up

Hi Mark,

I did some more digging here and talked with the internal team. It turns out this is related to a Javascript limitation. You can try it by typing a 18+ digit number into your JS console:

113345345345345348 // results in 113345345345345340
  1. A ticket has already been created in our internal tracking system for this issue. There is not a target date for getting this issue addressed yet but our devs are aware of it. We will let you know when the fix is available.

    In the meantime, there are a couple of workarounds you can use:​

    Have a shorter unique id field, as you’re doing now

  2. Were you using Integer or Unique Id for the field type in the Skuid Data source schema settings? If you change the field type to text, it should allow you to get around the JS rounding thing. Unique Id may also be worth a shot if you haven't tried it yet.

Screen Shot 2020-12-30 at 10.28.44 AM.png

Thanks! Let me know if you have any questions or concerns.