How to get the 2 previous snap label and snap instance id .
You can use the Snaplogic Read snap. Set the Asset Type to Pipeline, and in Asset Path enter the full path to your pipeline (Organization/ProjectSpace/Project/Pipeline). Like that, you can get complete info on any of the snaps in your pipeline. Please note that your incoming data will be placed in original.
Hope this helps,
Could you share more about your use case? How do you use that information in the child pipeline?
@tlikarish i have a parent pipe line which which will browse the sftp location and send this information to the child pipe line. Child pipe line will read the file and generates the XML and sends this XML to other system using the rest post snap. So if rest post snap fails then i want snap label and snap instance id of the rest post snap. I will send this information to the global error handler pipe line. Global error pipe line will send this information in an email.
Would adding a Mapper with pass through selected work for you? You’d add the audit information like this where the Snap label is manually set. The
snap.instanceId refers to the mapper, but you could easily find the upstream snap from there. The
pipe.ruuid may also be useful to include and you could even pass on a uri to include that could link back to the pipe execution for debugging.
If the process allows, you can take out an error view on your rest snap, and combine the outputs with Union. That way, you can get the label and the instance_id if the rest snap fails.
I’m not clear on why you need variables to do this. The label of the “REST Post” snap is “REST Post”. It’s constant unless you change it. Can’t you just pass “REST Post” to your child pipeline?
The snap.instanceId of the REST Post is a bit harder to discover since our UI doesn’t expose it. But it’s also constant – it was assigned at design time when the snap was added to the pipeline. It doesn’t change at runtime. You could probably find it by exporting the pipeline and looking at the .slp file. But I’m also wondering how this value is useful when it’s received in an email. What would one do with this information? How would the snap.instanceId value help in determining which snap failed? If the label is unique within the pipeline and you’re including the name or ID of the pipeline, wouldn’t that be sufficient?
Thank you all for your suggestions.We were trying to avoid the hard coding of the values.