<?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>Issue while inserting data in third party data source</title><link>https://community.appian.com/discussions/f/integrations/10765/issue-while-inserting-data-in-third-party-data-source</link><description>Hi All 
 I am working on version 17.2. 
 I am connecting with a third party data source. I have created a CDT which has the same structure as the table in the third party data source. I am able to select as well as update data in the third party data</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47457?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2017 08:38:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4d590149-c948-4f0a-a5e0-e12404b42d95</guid><dc:creator>komalc3</dc:creator><description>Hi @jamins952&lt;br /&gt;
&lt;br /&gt;
Since in my case, the Id is an auto generated value and not sequence generator so I used the attibutes for GeneratedValue provided by you, but I didn&amp;#39;t help me out either.&lt;br /&gt;
Thanks!!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47264?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2017 07:10:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2330fd21-6e64-41a0-b326-929a732a70a0</guid><dc:creator>komalc3</dc:creator><description>Hi  &lt;br /&gt;
&lt;br /&gt;
There is no mis match between CDT and Table as I mentioned in my query earlier, I can select as well as update the table but cannot insert due tot he ID field.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47215?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 04:29:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3269a00-b6cf-425d-8c31-ad8a03fd948f</guid><dc:creator>aloks0189</dc:creator><description>So, in such case, are you sure about, the changes made in CDT&amp;#39;s are reflecting to the DB properly?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47214?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 04:18:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41cc468e-0032-4902-92b3-8e370f5fa585</guid><dc:creator>komalc3</dc:creator><description>Hi Alok&lt;br /&gt;
&lt;br /&gt;
I can&amp;#39;t drop the tables as the Oracle 12c database is not only hit by Appian but also by other systems.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47187?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 10:28:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36983744-1e46-46c7-800a-d0a9cac6accf</guid><dc:creator>Jasmin</dc:creator><description>Hi Komal , Can you try below annotations on ID field.&lt;br /&gt;
@Id &lt;br /&gt;
@SequenceGenerator(name=&amp;quot;my_SeqGenerator&amp;quot;, sequenceName=&amp;quot;DB_Sq_Name&amp;quot;) &lt;br /&gt;
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator=&amp;quot;my_SeqGenerator&amp;quot;) &lt;br /&gt;
@Column(name=&amp;quot;ID&amp;quot;, columnDefinition=&amp;quot;NUMBER(12,0)&amp;quot;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47185?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 10:16:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93fc75d5-9179-4706-b220-9136f6a7f4ac</guid><dc:creator>aloks0189</dc:creator><description>HI  just for confirmation, are you dropping and recreating the tables by publishing the Data Store while modifying the XSD?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47184?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 10:15:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9c71cdf6-ee19-45e8-b9c8-f6059edad101</guid><dc:creator>komalc3</dc:creator><description>&lt;a href="/members/ravir93"&gt;Ravi Roshan&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Thank you for replying!!&lt;br /&gt;
As mentioned in my query itself (on top of the query section), the primary key is passed as null through Appian interface thus Write to Data store entity breaks, which is an expected behaviour. &lt;br /&gt;
I want to know how does the primary key gets auto generate because in Oracle 12c itself it is handling it via. &amp;quot;GENERATED AS IDENTITY NOT NULL&amp;quot;.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47169?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 09:14:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f1728261-7ac9-44e1-803a-afca7952458f</guid><dc:creator>Ravi Roshan</dc:creator><description>CREATE TABLE [dbo].[XYZ](&lt;br /&gt;
	[ID] [int] IDENTITY(1,1) NOT NULL,&lt;br /&gt;
	CONSTRAINT [PK_XYZ_3214EC2773] PRIMARY KEY CLUSTERED&lt;br /&gt;
	(&lt;br /&gt;
	[ID] ASC&lt;br /&gt;
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
The second query was, are you providing and value for ID  in your PV as &amp;quot; &amp;quot;(Space character) or null?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47165?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 07:22:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75d0ce58-832a-49b8-ab31-ecf2d0933351</guid><dc:creator>komalc3</dc:creator><description>Hi ravir93&lt;br /&gt;
&lt;br /&gt;
Thank you for replying!!&lt;br /&gt;
&lt;br /&gt;
The primary key configurations: are:&lt;br /&gt;
 &amp;quot;GENERATED AS IDENTITY NOT NULL&amp;quot;.&lt;br /&gt;
Can you please elaborate the second question that you have asked.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47143?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 12:09:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5a284ee2-46e1-4ae0-bfe5-e2725a6f8df5</guid><dc:creator>Ravi Roshan</dc:creator><description>Can you share the Primary key configuration from your DB, I suppose there will be some issue. For the other side are you providing any value for ID column?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47118?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 03:27:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f50ccb37-f141-4a1a-9f5d-f58a6f102222</guid><dc:creator>komalc3</dc:creator><description>Hi @ravir93&lt;br /&gt;
&lt;br /&gt;
Thank you for replying!!&lt;br /&gt;
But this is also not working.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47050?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 12:26:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04b93d58-57ba-4dda-9603-984fae2752f3</guid><dc:creator>Ravi Roshan</dc:creator><description>Can you please try with this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xsd:element name=&amp;quot;id&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:int&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsd:annotation&amp;gt;&lt;br /&gt;
          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Id @Column(name=&amp;quot;ID&amp;quot;, columnDefinition=&amp;quot;int&amp;quot;, nullable=false) @GeneratedValue&amp;lt;/xsd:appinfo&amp;gt;&lt;br /&gt;
        &amp;lt;/xsd:annotation&amp;gt;&lt;br /&gt;
      &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And please also check the primary key configuration in table also.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47047?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 12:10:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec304752-1e21-4b7e-86fa-649451f39048</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;As per my understanding, if that&amp;#39;s a Third Party System, then we don&amp;#39;t have any control over that system, i mean to say&lt;br /&gt; &lt;br /&gt; The Sequence must be created from 3rd party Side, the consumer or the one who is going to consume the service/Client, is no where responsible for configuring sequence over a table.&lt;br /&gt; &lt;br /&gt; So while creating the CDT, we just need to mark one Property (like ID) as PK but not Auto generated.&lt;br /&gt; &lt;br /&gt; Also, when you want to persist the data into 3rd Party System, the 3rd Party must define some approach, like an API or function etc. through which the Client can pass the remaining column/property values where the id will be generated by help of Sequence or using Sequence with Trigger&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47035?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 06:34:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a11cc4b-b86a-422b-a146-04b9dda3ac97</guid><dc:creator>PhilB</dc:creator><description>Probably worth a support case then!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47031?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 03:09:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:22c13cd7-ed87-40ca-adee-a45fa900ea03</guid><dc:creator>komalc3</dc:creator><description>Hi @phib&lt;br /&gt;
&lt;br /&gt;
Thank you for replying!!&lt;br /&gt;
I have tried individually with @GeneratedValue as well as @SequenceGenerator and using them together as well, but the issue still persists.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47014?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 11:25:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:67d76286-7e01-45bf-af6b-4b0cd664292c</guid><dc:creator>PhilB</dc:creator><description>&lt;p&gt;I&amp;#39;m guessing you&amp;#39;re on Oracle 12c? Have you tried it &lt;em&gt;with &lt;/em&gt;the&amp;nbsp;@GeneratedValue annotation but &lt;em&gt;without&lt;/em&gt;&amp;nbsp;the @SequenceGenerator annotation?&amp;nbsp;I think IDENTITY means you don&amp;#39;t get a sequence name - it&amp;#39;s Oracle&amp;#39;s equivalent of AUTO_INCREMENT. If it doesn&amp;#39;t work without&amp;nbsp;@SequenceGenerator, IDENTITY might not be supported yet - worth raising a support case to check.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47009?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 10:37:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f1cd4e86-eb3f-4b4b-9cbb-24e1b47df8b0</guid><dc:creator>komalc3</dc:creator><description>Hi Alok&lt;br /&gt;
&lt;br /&gt;
Thank you for replying!&lt;br /&gt;
The third party data source is Oracle.&lt;br /&gt;
&lt;br /&gt;
As mentioned in my question, the primary key is a number which is created as &amp;quot;GENERATED AS IDENTITY NOT NULL&amp;quot; in the Oracle data base; the primary key created doesn&amp;#39;t have any sequenceName.&lt;br /&gt;
&lt;br /&gt;
Any suggestions.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while inserting data in third party data source</title><link>https://community.appian.com/thread/47008?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 10:31:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00cfe4a4-c6f7-49f2-a210-a10afce3a1b7</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;Hi @komalc one small clarification, which database is getting used by Third Party System like&amp;nbsp;Oracle, MySQL, PostgreSQL etc...&lt;/p&gt;
&lt;p&gt;The reason behind asking is, @SequenceGenerator represents the generation strategy as Sequence which is one of the type of generator, and there many databases which do not support Sequence Strategy for PK Generation, such as MYSQL&lt;/p&gt;
&lt;p&gt;These are few popular databases which supports Sequence Generation Strategy, such as:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oracle,&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;SQL Server 2012,&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;PostgreSQL,&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;DB2,&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;HSQLDB etc..&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, if your DB supports Sequence Generation Strategy then try defining this as mention below:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;@Id&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;@Column(name=&amp;quot;ID&amp;quot;, columnDefinition=&amp;quot;NUMBER&amp;quot;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;@GeneratedValue(generator=&amp;quot;my_seq&amp;quot;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;@SequenceGenerator(name=&amp;quot;my_seq&amp;quot;,sequenceName=&amp;quot;MY_SEQ&amp;quot;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this will help you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>