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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rwnetwork
Creator
Creator

The operator * is undefined for the argument type(s) java.lang.String, java.lang.String

Hello,

I have what seems to be an easy job that is not working.

I just want to insert 3 columns from a tas400 input into an idb2 table.

One column I would like to bring in the file name from the previous tfilelist component using a built in Talend expression.

I've tried several times to modify the red underlined area that is being flagged in the Code tab, but with no success.

I attached snapshots.

And also, I do have a context defined as a File Location path of the file I would like to get the name of at time of processing.

 

Anyone know how to resolve my error?

Thank you!

Michelle

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Michelle,

 

    I think we overlooked the String closure for Insert statements. A simple example for String insert is as shown below.

0683p000009M8Bl.png

 

So in your case, you need to add single quotes for your full file path within single quotes. Please add opening single quote as

 

values ('"+context.filelocation                   (before double quotes)

and closing single quotes as CURRENT_FILE"))+"', current_timestamp                 (after double quotes)

 

I believe it should do the magic. Could you please try and let me know?

 

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

View solution in original post

7 Replies
tnewbie
Creator II
Creator II

MMiller,

 

At the outset i see that you are enclosing context variables in quotes, try removing those quotes around context variables, allowing the system to infer those values rather than considering them as constants.

 

Let me know how it goes.

Anonymous
Not applicable

Hi Michelle,

 

      I would recommend some minor changes in your current job flow.

 

1) The first suggestion will be to use On SubJob Ok instead of On Component Ok.

 

0683p000009M8hu.png

 

You can refer the difference between two in below link.

https://help.talend.com/reader/t8PcR8IoDGOfid5OjAngXQ/q1xPuU8rV3IK6WG6~AkREg

 

2) You need to realign the syntax of your query. You cannot change the code in code view. You can use the code view to identify the area of error. Then go back to designer mode and make necessary amendments. Since Talend is code generator, the code will automatically get changed once you make changes in Designer mode.

0683p000009M8mA.png

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

 

Now, the last tip like in Avenger End credits 😉

 

Please use the Photo icon as shown below to upload your images inline in your post. It will generate more interest among Talend users as many of them are reluctant to open the attachments.

0683p000009M8jc.png

 

 

rwnetwork
Creator
Creator
Author

Thanks for the reply, but unfortunately this did not remove the error.

rwnetwork
Creator
Creator
Author

Thank you Nikhilthampi!  

I will try your suggestions.

And thank you also for the link for the difference between subjob and component's ok!

In addition, I will use the photos function for postings.  0683p000009MACJ.png

rwnetwork
Creator
Creator
Author

Ok here is where I am at with the changes......and I am getting a new error which are attached.

Token G?

 

 

0683p000009M8Kb.png0683p000009M8Kz.png

Anonymous
Not applicable

Hi Michelle,

 

    I think we overlooked the String closure for Insert statements. A simple example for String insert is as shown below.

0683p000009M8Bl.png

 

So in your case, you need to add single quotes for your full file path within single quotes. Please add opening single quote as

 

values ('"+context.filelocation                   (before double quotes)

and closing single quotes as CURRENT_FILE"))+"', current_timestamp                 (after double quotes)

 

I believe it should do the magic. Could you please try and let me know?

 

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

rwnetwork
Creator
Creator
Author

You rock!

Yes, this did it....it is now writing to the table as expected.

Thank you so much @nthampi!

Will mark as Solution and give kudos!