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

tmap convert date + Integer to a string

I am trying to combine both a date and integer type field into 1 string field. This is what I have : (String.valueOf(row1.CONTACT_ID)+TalendDate.formatDate("yyyy-MM-dd",row21.CREATED_DT)) . it's not working, when I run the subjob i'm getting the error: row1 cannot be resolved to a variable. 

 

What am I doing wrong?

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

If both CONTACT_ID and CREATED_DT fields are issued from the same flow, you should have row21 twice.

Else share this part of your job design including schemas.

View solution in original post

4 Replies
TRF
Champion II
Champion II

If both CONTACT_ID and CREATED_DT fields are issued from the same flow, you should have row21 twice.

Else share this part of your job design including schemas.

Anonymous
Not applicable
Author

@aleif  kindly find the details below

 

0683p000009M5uv.png

 

(String.valueOf(row1.contactid)+TalendDate.formatDate("yyyy-MM-dd",row1.createdDT))

 

Thanks,

Prabuj

/ Don't forget to give kudos /

Anonymous
Not applicable
Author

Hi,

 

    You can also use the tConvertType to convert the data from one data type to another. In your case, you can set the target data type as to String.

 

https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/GDoeGgb~qKpyQ_84gB37WQ

 

    The existing solutions outlined by other members also will work but I thought to introduce this component for future reference.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

actually i have this now and i'm still getting a result that the output column needs to be a string. 

 

String.valueOf((row21.CONTACT_ID)+(TalendDate.formatDate("yyyy-MM-dd",row21.CREATED_DT)))

 

In the tLogRow for reject i'm getting 

INVALID_ARGUMENT_TYPE| |XXXX_ID__c must be a string