Can we pass the "pipe" object as a parameter to a child pipeline?

I’m using this for an error handler.
The executing pipeline hits an error that sends it to the error pipeline.
The error pipeline writes the details to a db table or flatfile. I was hoping I wouldn’t have to send all the pipe details as parameters individually from all pipelines that use this and could reference just the object.
I could see an option to write the details to a file that gets read in, but that also seems clunky.

I apologize if this is basic and has been discussed but my search didn’t pull anything back.

Melissa

Hi @mmussitsch,

Yes ! You can absolutely pass the whole pipe object to the child pipeline form the parent pipeline. In your parent pipeline, with the Pipeline Execute snap you can pass a parameter for example pipeObject:
image
Once you pass the pipe object to your child pipeline, you can parse the JSON string with the JSON.parse() method and then you can access any pipe attribute you need.


For example:

JSON.parse(_pipeObject).label

Will give you the label of your parent pipeline. To see all properties, you can just map the whole pipeObject parameter JSON.parse(_pipeObject).

2 Likes

Thank you!
I swear I tried this, but it’s that dang ‘=’ sign that burns me more often than not. I didn’t send it properly and instead was treating it as a string.