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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to pass data to other component using cprocessor

I need to create a file name from cprocessor and pass the same to cAwss3 component as "CamelAwsS3Key". Can i do that? how?

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi @lalkiran88,

 

You can do this with a cSetHeader component (https://help.talend.com/reader/wPJh3yAxz0baR8imIwmlYA/PJMBt6~g0wBzv97ZUwEpUw), but I sense you are using some code to build your value. In which case there is a way to do the job of the tSetHeader component using code. In your cProcessor code box, carry out your value creation code and then add the following line....

exchange.getIn().setHeader("CamelAwsS3Key", "myFile.txt");

This will add your new header to the IN Body of the Exchange message. Obviously replace the "myFile.txt" value with your calculated value

 

Regards

 

Richard

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi @lalkiran88,

 

You can do this with a cSetHeader component (https://help.talend.com/reader/wPJh3yAxz0baR8imIwmlYA/PJMBt6~g0wBzv97ZUwEpUw), but I sense you are using some code to build your value. In which case there is a way to do the job of the tSetHeader component using code. In your cProcessor code box, carry out your value creation code and then add the following line....

exchange.getIn().setHeader("CamelAwsS3Key", "myFile.txt");

This will add your new header to the IN Body of the Exchange message. Obviously replace the "myFile.txt" value with your calculated value

 

Regards

 

Richard