Importing excel file via workshop application and parsing data thereof

Hi Community,

I am trying to build a workshop app that allows my users to upload an excel file with a specified format, I would like that file to then be passed into a pipeline or action that results in an ontology update. Effectively it allows the users to add bulk data they are receiving from clients as an excel export. My original thought was to use attachment the workshop side of this works fine, and I can get the latest excel file uploaded and this run as an automation. The crux of the issue is that I cannot seem to call the excel file from the attachment into either pipeline or action, as it needs to be defined as an input at the outset, however I am identfying the xlsx as part of my code.. It seems this is possible with a media object but this doesn’t support xlsx or csv.

Is there an elegant solution for this I am missing? If not would really appreciate direction on this. Seems incredibly strange for it to not be possible.

Hi, and welcome to the forum!

Just to be clear – have you followed the example in the docs?

If your file is always in the same format (oh, to be so lucky), you should be able to create a simple Python function that runs every time it’s uploaded.

You could then use pandas.read_excel() and pass the byte stream there, and have that function update your Ontology.

Let me know how this works for you!

You may already be satisfied with inline action forms where you can have .csv uploads to execute bulk actions (creating rows).

If you require a more custom workflow, you could let people upload the Excel file as an attachment and then have an automation doing the parsing for you into objects - which allows for the highest flexibility.

If you want to not compute the parsing on the ontology directly but in a batch pipeline, you probably have to upload the file into a media set so this can be used as an input to the batch pipeline since attachments can not be materialized from the ontology (please correct me if I am wrong)…

Ok so possible at the ontology level but would like to run at the pipeline level, is it possible to call an attachment into a pipeline?

Hey @71a83f08da154a1526b4 , did you get anywhere with this? I have a very similar requirement for this