Dynamic Import from Database using EasyMorph tables

Hello,

Is it possible to perform an import from a database using an SQL condition based on the result from another table in the EasyMorph file?

In my situation, I need to do a left join between a small database table and another particularly large database table, which takes a lot of time to load. If a condition is added that the code must be on the list of distinct values from the smaller table, the load time can be drastically decreased.

So, is there an action that could dynamically restrict the rows loaded from a database table using results from the same EasyMorph file?

Thanks, Davide

this is the action to use

https://help.easymorph.com/doku.php?id=transformations:selectdbrowsbykeys

Hi,

If I use the SELECT MATCHING DATABASE ROWS action, I need to load the entire table first. I want to reduce the import time by adding a dynamic condition in the action properties of the import or by using a previous action.

So, is there a way to do that?

Thanks,
Davide

Read the help remarks - it explains the backend logic - assuming you are querying a database it only downloads the matching records - not all records - it works really well

Under the hood, the action creates a temporary table in the target database, uploads key field combinations into it, and performs a SELECT..WHERE..EXISTS statement. After the statement is executed the temporary table is deleted.

1 Like

Small clarification: in a recent version, we've updated how the "Select matching database rows" action works. Now it doesn't create a temporary table - it was inconvenient in cases when the database account used only had read-only permissions. Instead, it does the selection entirely with SQL statements.

The help article hasn't been updated yet.