<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Postgresql sequence in primary key in Installing and Upgrading</title>
    <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395245#M8024</link>
    <description>Hi !&lt;BR /&gt;My idPersonne is really my primary key and it is a big serial type. In Postgresql, bigserial is converted in bigint with a sequence. If you want the sequence works, the must delete the primary key from the Talend 's schema. I tried it and it works fine. Now it's Postgresql which increments my primary key with the sequence.&lt;BR /&gt;But, now, how to do with the default value ? For example, I use an idProfession with a default value at 92101. But if the profession dosen't match, I have a null value in the column, not a 92101. How to do for having my default value when the profession is not found ?&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;Kim</description>
    <pubDate>Mon, 13 Nov 2006 10:30:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-11-13T10:30:16Z</dc:date>
    <item>
      <title>Postgresql sequence in primary key</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395243#M8022</link>
      <description>Hi ! 
&lt;BR /&gt;I use sequence for incrementing my primary key. (e.g : CREATE SEQUENCE "public"."personne_idpersonne_seq" INCREMENT 1 MINVALUE 1 
&lt;BR /&gt; MAXVALUE 9223372036854775807 START 1 CACHE 1 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;In my table I have this : idpersonne, which is a Bigint type and it default value is "nextval('personne_idpersonne_seq'::regclass)" 
&lt;BR /&gt;When I want insert data into my "personne" table, I don't want give it an idpersonne. My sequence does that. 
&lt;BR /&gt;But I have this message : 
&lt;BR /&gt;"DBD: 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAB6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158321i00588DF41617C922/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAB6.png" alt="0683p000009MAB6.png" /&gt;&lt;/span&gt;g::st execute failed: ERROR: null value in column "idpersonne" violates not-null constraint 
&lt;BR /&gt;can't execute insert query 
&lt;BR /&gt;A thread exited while 2 threads were running. " 
&lt;BR /&gt;How to do that ? 
&lt;BR /&gt;Thanks a lot. 
&lt;BR /&gt;Kim</description>
      <pubDate>Sat, 16 Nov 2024 14:38:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395243#M8022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql sequence in primary key</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395244#M8023</link>
      <description>Hi,
&lt;BR /&gt;We need some explanation about your Data Integration Job.
&lt;BR /&gt;Can you send us a screenshot of your Job, and explain your need?
&lt;BR /&gt;If I understand your problem, you would like to insert with an External Sequence in your "idpersonne" a PrimaryKey.
&lt;BR /&gt;I think idpersonne is not a true PRIMARY_KEY but a simulated PRIMARY_KEY, isn't it ?
&lt;BR /&gt;I am waiting more complements to reproduce your problem and resolve it.
&lt;BR /&gt;Regards.</description>
      <pubDate>Fri, 10 Nov 2006 17:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395244#M8023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-10T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql sequence in primary key</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395245#M8024</link>
      <description>Hi !&lt;BR /&gt;My idPersonne is really my primary key and it is a big serial type. In Postgresql, bigserial is converted in bigint with a sequence. If you want the sequence works, the must delete the primary key from the Talend 's schema. I tried it and it works fine. Now it's Postgresql which increments my primary key with the sequence.&lt;BR /&gt;But, now, how to do with the default value ? For example, I use an idProfession with a default value at 92101. But if the profession dosen't match, I have a null value in the column, not a 92101. How to do for having my default value when the profession is not found ?&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;Kim</description>
      <pubDate>Mon, 13 Nov 2006 10:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395245#M8024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-13T10:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql sequence in primary key</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395246#M8025</link>
      <description>Hi,&lt;BR /&gt;I agree with your first solution, if you want to use your default value for the PRIMARY_KEY, ignore it of your Schema Table.&lt;BR /&gt;In this case the tDBOuput component will ignore the idpersonne column and insert by consequence your Default value ( for example = nextval('personne_idpersonne_seq'::regclass)).&lt;BR /&gt;In the other case : you must use a tMap component, you can create Constraint conditions and manage reject data. (for Example : $row1 eq '' or $row1 ne '')&lt;BR /&gt;I propose to you to look at the tMap tutorial for the Constraint conditions creation.&lt;BR /&gt;You can look at this two screenshots the Job and the tMap configuration for your issue.&lt;BR /&gt;Screenshot 1 : the Job with one source, a tMap (management of reject) and two tDBOuput (your table destination for two output).&lt;BR /&gt;Screenshot 2 : the tMap properties, $row1 is your idProfession and TalendTest in Out1 is your 92101 default Value.&lt;BR /&gt;		Out2 are the data with a Constraint condition : $row1 ne '' (libelle not equal empty).&lt;BR /&gt;		Out1 are the Data rejected with TalendTest in subsitution of $row1.&lt;BR /&gt;In red circle the Important point of tMap properties for your Issue.&lt;BR /&gt;Regards.</description>
      <pubDate>Tue, 14 Nov 2006 13:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395246#M8025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-14T13:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql sequence in primary key</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395247#M8026</link>
      <description>Hi ! 
&lt;BR /&gt;I think it's a big job for having just a default value in a column, when you have no other value to insert... 
&lt;BR /&gt;When you tell "two tDBOuput (your table destination for two output)", you speak about the same table ? If so, I tried to do again your example on the same output table. The result is not really what I was waiting for... I have twice the number of rows ... 
&lt;BR /&gt;How to implement this right ? 
&lt;BR /&gt;Thanks a lot. 
&lt;BR /&gt;Kim</description>
      <pubDate>Mon, 20 Nov 2006 10:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395247#M8026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-20T10:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql sequence in primary key</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395248#M8027</link>
      <description>Hi, 
&lt;BR /&gt;Have you checked the Reject checkBox ? 
&lt;BR /&gt;I try to reproduce your issue and it works fine, the 'null' value becomes 92101. 
&lt;BR /&gt;But another problem is present, we know this bug, referenced in our 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCpMWCA0" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Archive/merging-two-source-files/td-p/167056&lt;/A&gt;. 
&lt;BR /&gt;It will be fixed in the next Talend version. 
&lt;BR /&gt;Regards.</description>
      <pubDate>Mon, 20 Nov 2006 12:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Postgresql-sequence-in-primary-key/m-p/2395248#M8027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-20T12:03:14Z</dc:date>
    </item>
  </channel>
</rss>

