Forum Discussion
mbowen
4 years agoEmployee
The error you are receiving is from the Redshift database trying to insert a decimal into an integer field. Can you tell me the data type of the annual_revenue field ? It seems it is defined as an integer, but we’re trying to store a decimal number into field. So all the snap data transformation, etc, are relevant, but what really matters is the final value getting inserted into the target database, and it seems there is a mismatch here.
mbowen
4 years agoEmployee
Here is some sql to emit schema for a table. I’m sure there are other ways in Redshift.
SELECT "tablename", "column", "type"
FROM PG_TABLE_DEF
WHERE schemaname = 'public'
AND tablename = 't1207'
->
TABLENAME COLUMN TYPE
t1207 id integer
t1207 bigdecimal double precision