Skip to main content
August 10, 2022
Question

Write to Database

  • August 10, 2022
  • 7 replies
  • 0 views

Hi All,

I am trying to import CSV file to database, first I am reading the CSV file through rule and mapping the values to CDT. After that I am trying to insert the data into DB, But I am getting below error. 

Please provide Solution on this.

Thanks,

Kiran

    7 replies

    peter.lewis
    Employee
    August 10, 2022

    The main error for this is in the middle where it says "Bad value for type int". Can you share what the value of your variable is that you're trying to write to the database? Is it possible that you have an integer value that is either too long or that is the wrong type?

    August 10, 2022

    We are using int8 data type for number on PostgreSQL.

    peter.lewis
    Employee
    August 10, 2022

    Are you using int8 for your primary key? I think that could be causing the problem here. Appian only supports integers up to 2^32 - 1, so you should only use int4 in PostgreSQL to match that number.