42
Views
4
Comments
How to add a custom function to convert unstructured data to structured data?
Question

I wanted to add a custom function (can it possible to add a python function?) to convert my unstructured data (which I extract from a pdf file) to a structured one so that I can save it to the database. 

2023-07-28 17-00-32
Marco Arede
 
MVP

Hello,

No, it's not possible for OutSystems to compile Phyton code. You can always build a Phyton function externally to your application and integrate with your OutSystems applications (e.g. via API, JS, Extension). 

How you can convert unstructured data depends on the data itself and the structure to achieve. Maybe you want to consider converting your data into a JSON format, then using the OutSystems built-in action JSON Deserialize, you provide a structured data to parse it in OutSystems.

Does this answer covers your question?

UserImage.jpg
Adyashree Mahapatra

Actually I have certain tables in my pdf file and I need to store them on database after extraction.

Can you please suggest any way to achieve so?

Thanks in advance,

Adyashree

2025-02-04 10-17-42
Shreelakshmi N S
Champion

Hi Adyashree,

You can call your python function  through API.

To use it through API,

Have a POST API defined from your Python server and consume it in outsystems and send the necessary data so that you can get the expected output from the function.

Since you are new to Outsystems, 

Know more about APIs - Integrating with Web Services

Regards,

Shree

2019-03-19 12-24-07
Mariano Picco
 
MVP

Agree with above, APIs are your answer if you already have your function tried and tested, but that'll have to be running in a server somewhere (container perhaps?), not locally and as part of the OutSystems code.

As to how can you extract a table from a PDF, I would ask, is there any way to get your data in another format? Excel is much easier to work with for tables and OutSystems does have the capability to extract data out of Excel files out of the box

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.