Passing Tables Between Modules

Good Afternoon,

I have been trialling EasyMorph in an attempt to reduce the amount of code we are writing.

A lot of what we do involves ETL processes within code due to us heavily relying on RESTful APIs.

I have an EasyMorph project where I make an API call to get users then then the process flows to three modules each making API calls to other endpoints but ultimately cross referencing against the original user API call mentioned at the beginning.

My question is, is there anyway of passing my original table of users to the three modules to save making the users API call three times in each module?

As I understand it this could be achieved by putting all the logic in one module, but I donā€™t want to do this as there is quite a lot and I want a clean separation between the three distinct pieces of logic as well as the retrieval, transformation and export of data within them.

I could also split the modules into projects and call each subsequent project but this seems wrong. Or is it?

Presumably I could also pass the entire JSON response to the different modules as shared memory, but this is quite a bit of data and would also require transformation into a table in each module, which all seems quite wasteful.

Thanks in advance!

Hi,

If I understand your questions correctly, this could be an approach:

1 Like

Hi Nathan,

In EasyMorph it is possible to pass datasets to called modules and from called modules. When you call another module, use the ā€œInputā€ action in the called module to receive the input dataset of the ā€œCallā€ action.

Also, see the ā€œAdvanced topicsā€ in this article: EasyMorph | Subroutines

1 Like

Thanks for taking the time to answer @reynsnivea, this does work. However @dgudkov has made me aware of the ā€˜inputā€™ action which fits my scenario better as Iā€™m looking to separate my logic more.

Thanks for answering my question @dgudkov , this is what I was looking for!

Youā€™re welcome!

1 Like