Hello @Jakeer Shaik ,
Thanks for the question and using MS Q&A platform.
As we understand the ask here is about putting pipeline name and links to pipeline run into an email.
To get the pipeline name, we can use pipeline expression
@{pipeline().Pipeline}
To get the pipeine run ID we can use pipeline expression
@{pipeline().RunId}
However we need more than just the RunId to create a hyperlink. When I go to the Monitoring section and select a pipeline run to see details, the URL takes the form of:
https://web.azuresynapse.net/en/monitoring/pipelineruns/{pipeline_run_id}?workspace=%2Fsubscriptions%2F{subscription_id}%2FresourceGroups%2F{resource_group_name}%2Fproviders%2FMicrosoft.Synapse%2Fworkspaces%2F{workspace_name}
Seeing this, we can build up a URL. The %2F
is a URL-encoded form of slash /
. Everything after the ?workspace=
is describing the path to find the Synapse workspace. This isn't going to change, because the pipeline belongs to the workspace.
@{concat(
'https://web.azuresynapse.net/en/monitoring/pipelineruns/',
pipeline().RunId,
'?workspace=%2Fsubscriptions%2Fmy_subscription_id%2FresourceGroups%2Fmy_resource_group%2Fproviders%2FMicrosoft.Synapse%2Fworkspaces%2Fmy_Synapse_workspace'
)}
Now there is the question of turning this into a hyperlink. Some email clients work different. When I paste a URL into outlook it turns into link automatically. Some others need to click a button. Some use HTML. For the HTML links take the form of:
<a href="my_url">text to display</a>
We can also construct this with concat. For brevity, I put ...
instead of that long path discussed above.
@{concat(
'<a href="https://web.azuresynapse.net/en/monitoring/pipelineruns/',
pipeline().RunId,
'?workspace=%2F...',
'">',
pipeline().Pipeline,
'</a>'
)}
Please do let me if you have any queries.
Thanks
Martin
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators