Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tHashInput fails Type mismatch: cannot convert string to date. using SalesForce source

Recently, I found an existing job began to fail due to the use of a deprecated salesforce API version being used in my Talend job.

 

I've since updated Talend Studio to 6.4.1 and am using version 39 of SalesForce API. I retrieved the schema to update the field definitions etc. Unfortunately I am now receiving a type mismatch error in the tHashInput action. The action is consuming SalesForce Contact object. Initially, I had a very large number of type mismatch errors, and I began reducing the number of fields "used" in the action. I was able to narrow down a specific example to post here for some guidance. 

 

"CreatedDate" and "LastModifiedDate" are system fields in SalesForce within the Contact object. The schema correctly classifies these fields as date fields with a date pattern. If these fields are included in the tHashInput action, I receive the error "Type mismatch: cannot convert from String to Date" for each of these fields. What gives? I've spent hours trying various things to resolve and I've officially hit a wall. Please help!

 

 

Labels (4)
5 Replies
TRF
Champion II
Champion II

Hi,
What's the datatype for these fields in the associated tHashOutput component which, I suppose, is connected to the tSalesforceInput?
Probably String.
Also an other Double field you try to match to a String.
Anonymous
Not applicable
Author

Hi TRF, 

If you look at the attached screenshot, the column is selected to be Date with a Date Pattern defined.  The tHashInput/Output is fed into a tMap. If you look at the original screenshot attached to this post, you can see that the error is occurring directly on the tHashInput action. 

 

I did not follow your comment "Also an other Double field you try to match to a String". Can you clarify? Thanks!


2017-12-06_17-27-48.jpg
TRF
Champion II
Champion II

Double check schemas are aligned for tSalesforceInput, tHashOutput and tHashInput. I can't try now, but I'm almost sure the problem comes from here.
As shown by the error message, you got the problem for 3 fields, not only the 2 you mentionned.
Anonymous
Not applicable
Author

Yes, I'm having difficult with other fields as well, but wanted to at least focus on these two fields first and hopefully the root cause for all fields is the same.  As you can see from the tSalesforceInput action, the field definition is Date with the same date pattern. 

 

0683p000009LsAK.jpg

TRF
Champion II
Champion II

Hi,

I have tried just now, it works fine.

So, I think the problem you have is due to a desynchronization between your tHashOutput and tHashInputSchema.

0683p000009Ls8u.png0683p000009LrPw.png0683p000009Ls4X.png