<?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 Null CreatedDate from Salesforce in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274547#M51188</link>
    <description>&lt;P&gt;I have create a job for Salesforce and Oracle DB Integration via tMap. However i am always getting created date as null in DB and also in tLogRow whereas data is updated properly for LastModifiedDate.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have also tried using below logic to check if the Date is actually null or being missed because of wrong formatting.&lt;/P&gt; 
&lt;P&gt;row1.CreatedDate != null ? row1.CreatedDate :&amp;nbsp;TalendDate.getDate("yyyy-MM-dd")&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As a result i am always getting today's data in the DB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;/P&gt; 
&lt;P&gt;Ankit Singh&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 07:49:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-07T07:49:07Z</dc:date>
    <item>
      <title>Null CreatedDate from Salesforce</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274547#M51188</link>
      <description>&lt;P&gt;I have create a job for Salesforce and Oracle DB Integration via tMap. However i am always getting created date as null in DB and also in tLogRow whereas data is updated properly for LastModifiedDate.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have also tried using below logic to check if the Date is actually null or being missed because of wrong formatting.&lt;/P&gt; 
&lt;P&gt;row1.CreatedDate != null ? row1.CreatedDate :&amp;nbsp;TalendDate.getDate("yyyy-MM-dd")&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As a result i am always getting today's data in the DB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;/P&gt; 
&lt;P&gt;Ankit Singh&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 07:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274547#M51188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-07T07:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Null CreatedDate from Salesforce</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274548#M51189</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I don't have a solution for your problem yet but I have some remarks.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The following code shouldn't work in the tMap :&lt;/P&gt; 
&lt;PRE&gt;row1.CreatedDate != null ? row1.CreatedDate : TalendDate.getDate("yyyy-MM-dd")&lt;/PRE&gt; 
&lt;P&gt;According ro your screenshot, both row1.CreatedDate and CREATION_DATE are Date objects while&amp;nbsp;TalendDate.getDate("yyyy-MM-dd") returns a String.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This code cannot work and you should have a "Type mismatch: cannot convert from String to Date" error message!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Assuming this is not exactly the code you have in your job, and that you have something like this instead:&lt;/P&gt; 
&lt;PRE&gt;row1.CreatedDate != null ? row1.CreatedDate : TalendDate.getCurrentDate()&lt;/PRE&gt; 
&lt;P&gt;Then, if you have the current date as output, it probably means you have null values as inputs!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Did you try to add a tLogRow before the tMap in order to see the actual values?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 09:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274548#M51189</guid>
      <dc:creator>lennelei</dc:creator>
      <dc:date>2019-08-07T09:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Null CreatedDate from Salesforce</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274549#M51190</link>
      <description>&lt;P&gt;Having null values for CreatedDate and LastModifiedDate Salesforce fields is just not possible.&lt;/P&gt;
&lt;P&gt;Share your job design + details for the tSalesforceInput component.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 09:35:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274549#M51190</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-08-07T09:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Null CreatedDate from Salesforce</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274550#M51191</link>
      <description>&lt;P&gt;Of course it's possible to have null value &lt;STRONG&gt;before&lt;/STRONG&gt; using the second option with ternary operator!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 08:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274550#M51191</guid>
      <dc:creator>lennelei</dc:creator>
      <dc:date>2019-08-08T08:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Null CreatedDate from Salesforce</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274551#M51192</link>
      <description>&lt;P&gt;No.&lt;/P&gt;
&lt;P&gt;On salesforce side CreatedDate and LastModifiedDate fields are never null (like id, owner and some others).&lt;/P&gt;
&lt;P&gt;So when you get records from salesforce, these fields are allways populated.&lt;/P&gt;
&lt;P&gt;If you have null, you have a bug somewhere.&lt;/P&gt;
&lt;P&gt;For example, if you enter the SOQL query by yourself, it may arrives if you write createDate instead of CreatedDate in your schema (and the job will not fail).&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 08:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Null-CreatedDate-from-Salesforce/m-p/2274551#M51192</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-08-08T08:33:46Z</dc:date>
    </item>
  </channel>
</rss>

