- Newest
- Most votes
- Most comments
Hi, it seems that the id you try to insert (2147483705 as per error message) is slightly out of allowed range of 4-byte int type allowed by Redshift: -2147483648 to +2147483647.
The column IDENTITY (seed, step)
, where values start with the value specified as seed
and increment by the number specified as step
. Double check how you have defined the columns. Also Amazon Redshift can skip a number of values when creating the identity values. Identity values are unique, but the order might not be maintained. Your can make the column BIGINT
or INT8
which provides 8 bytes
from ranging from -9223372036854775808
to 9223372036854775807
Yes, thanks for your answer. I know that redshift can skip a number of values, but the difference between the highest ID 2126824931 and the current one 2147483705 is trying to insert is at 20658774. It's making a big skip.
Relevant content
- Accepted Answerasked 3 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
Yes, I want to clarify that I am not specifying the value of 2147483705 in my insert command, it is the table itself that is calculating the ID incorrectly.