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: 
maximerose80
Contributor
Contributor

Concatenate context variables in an other context variable

Hi there !

First of all, I don't really know if I write this message in the right location.

But, here's my question :

Is it possible to concatenate 2 context variables in one ?

Actually, I work on Talend for an educational purpose and I have to send my work to my teacher, but I want him to change just one variable to make it work on his workspace.

I mean, I want to do something like this :

Context "FilePath"

  • context.FilePath_workspace : "myWorkspaceFilePath/"
  • context.FilePath_dataSources : context.FilePath_workspace + "sources/"

Context "Campaigns" (that's what I work on)

  • context.campaigns_folder : context.FilePath_dataSources + "Campaigns"

In my job, I have a tFileList to iterate and I want the directory to be context.campaigns_folder.

I don't know if you understand what I mean but it would be very nice if I can have an answer here !

Thanks !

Maxime

Labels (2)
2 Replies
Anonymous
Not applicable

Yes, you can concatenate the context variables on a tJava component. eg:

tJava

|onsubjobok

tFileList--iterate...>

on tjava:

context.FilePath_dataSources =context.FilePath_workspace + "sources/";

context.campaigns_folder=context.FilePath_dataSources + "Campaigns";

 

Please try and let me know if you still have any questions.

 

Regards

Shong

 

maximerose80
Contributor
Contributor
Author

Yes it works !

 

Thanks a lot !

 

Maxime