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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
pdtalend
Contributor
Contributor

How to output the HEAD revision (SVN) with tWarn?

Hi everybody,

 

I am using Talend Data Integration (7.1.1) with SVN and I want to output the HEAD revision of a job during execution using (e.g.) the tWarn step.

Does anyone know the Best Practice? Is there a specific parameter?

 

Best regards

Stefan

Labels (2)
6 Replies
nfz11
Creator III
Creator III

Are you talking about the revision number from your source control system or the Talend version number of the job incremented when you upload it to the cloud?

pdtalend
Contributor
Contributor
Author

Thanks for your reply. I mean the revision number from my source control system.

 

nfz11
Creator III
Creator III

You can always execute any command line program with the tSystem component.  You could run the command for your source control system that gives you the information you need and then output it with a tWarn, e.g.

svn info --show-item revision
pdtalend
Contributor
Contributor
Author

Hi nfz11,

 

thanks for the solution.

 

However, this would only work if SVN is available at runtime.

Suppose the SVN repository is only available in my development environment, but not in my production environment. The job would not be able to query a revision with the tSystem component at runtime.

So I'm looking for a way to store the HEAD revision in the build and roll it out with the job.

 

Do you have an idea for this?

 

Thanks

Stefan

nfz11
Creator III
Creator III

If you are using continuous integration for your deployment pipeline you could write a small shell script that writes the revision somewhere per my original suggestion and then have your job read that revision.  If you use Jenkins or some other CI system it should be fairly easy to do.

You could also write a web service that returns the svn revision or whatever data you need and that way your job could access the web service from anywhere.

You use case is not a common one so I don't think there are components in Talend that would do it across all platforms.  You will have to create a way to do it.

https://community.talend.com/t5/Architecture-Best-Practices-and/Install-configure-and-automate-Talen...

pdtalend
Contributor
Contributor
Author

Thank you very much for your detailed answer.

 

I probably won't be able to implement your approaches like this.

 

Some time ago we had a simple solution with SVN keyword substitution (see: http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html). But this doesn't work with newer versions of Talend anymore.

 

As soon as I have found a suitable solution, I will share it here.

 

Thanks

Stefan