Retrieve Attachment Property

Is there a way to retrieve the uploaded attachment linked to an object from a dataset in a python transform? I notice the stored attachment on upload is just a string of some rid (e.g. ri.attachments.main.attachment.f9f175bd-8143-4b8d-b972-abc298d85cc7 ).

I can see the actual attachment in Object explorer, but I need to do logic with it in transforms.

is there a way I can fetch the attachment with the rid in a python transform? Something like:

attachments = retrieve_attachment(df["attachment"])
... #do stuff w/ attachments

Note: the attachments are excel files and/or csv files.

Hello,

This can be achieved using the Get attachment content API within an external transform.
It is not possible, to my knowledge, to directly obtain the attachment content from the dataset.

1 Like

We recently opened a feature request to get the actual bytes of the attachment into the transform instead of the pointer/rid to the attachment.

Maybe you can do so as well to raise the awareness with Palantir Product Development.