<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Write to Database</title><link>https://community.appian.com/discussions/f/new-to-appian/25483/write-to-database</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99436?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 16:57:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b35b932a-cef0-43bf-af61-afddd543c2c8</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Hmm, I&amp;#39;m not sure why it would be working with int8 in another table - in general I&amp;#39;ve found that you shouldn&amp;#39;t use numbers that exceed the limit that Appian supports:&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Appian_Data_Types.html#number-(integer)"&gt;docs.appian.com/.../Appian_Data_Types.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99430?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 14:04:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d630ba59-f3dc-49cb-a476-33bb9b436004</guid><dc:creator>kirang100133</dc:creator><description>&lt;p&gt;Thanks Peter,&lt;/p&gt;
&lt;p&gt;It worked after converting data type to int4.&lt;/p&gt;
&lt;p&gt;But, the another question is int8 as I mentioned above we are using it as a primary key.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99428?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 13:06:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8ba5a312-96a5-41df-ae15-15e2448418c0</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Did you also change the CDT after you updated the database? You will need to make sure the data structure matches between them.&amp;nbsp;It would also be helpful to identify which field is actually causing the problem. Can you share what data you&amp;#39;re using in this process by showing a screenshot of your process variables from the monitoring view? Did you also try removing a few columns from the CDT to try and isolate which field is causing the issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99337?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 04:00:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:128f8f56-15b5-4948-a5a5-0ecbed8e1d48</guid><dc:creator>kirang100133</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;I tried with your suggestion, making primary key as int4 and we have one more column having data type as float8. But still I am getting the same error.&lt;/p&gt;
&lt;p&gt;NOTE: We are using int8 as a primary key in other table there it is working.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99304?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 11:59:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:60d0653f-891a-4276-b27c-663e9ae5e43a</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99303?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 11:54:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:26de96d4-c036-4813-ae45-2761773d95c7</guid><dc:creator>kirang100133</dc:creator><description>&lt;p&gt;We are using int8 data type for number on PostgreSQL.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to Database</title><link>https://community.appian.com/thread/99302?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 11:49:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1f82cfcd-2a34-41b1-a555-5305181308cf</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;The main error for this is in the middle where it says &amp;quot;Bad value for type int&amp;quot;. Can you share what the value of your variable is that you&amp;#39;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?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>