SQL execution in Tables

I have a Equipment Measurements table in which users input manually-collected data. However, the equipment we have has a hierarchy, such that when a measurement for a module (parent equipment) is added or updated, its children equipment should also get the same measurement recorded. For example, if the Module measures 24 degrees, all elements within that module should have 24 degrees recorded as their temperature as well.
I’ve managed to accomplish replicating the data with some clever recursive Automation, however it’s complicated and runs very slowly. I was wondering if there is a way of executing a (rather simple) INSERT sql query to quickly achieve the above.
From the Connector examples I saw, they all seem to discuss connection to external systems which requests the Insert and Update commands - is there a way for Tulip to generate the SQL query onto itself?

Hi @AquaMaofian,

I’m interested to better understand the automation that you’ve created . More than happy to set up some time to review or if you’re comfortable of posting a screenshot, we can dig into the execution time.

Also, the context of “slow” would be helpful - is that 10 seconds, 1 minute, or 10 minutes?



Hi Jake,
Thank you for reaching out. I’ll be happy to have an online session - do you have my email to set it up?
It a bit difficult to explain the automation by a screenshot, since I have to open each node in turn. Top part:

Bottom part:

In a nutshell, when a new record is inserted into my Data table for a Module element, I’m getting the info of that record + some more info from a helper table and after some checks to avoid endless loops, I create a new record with the same data for each Water Tank in the Module. This of course runs the automation again and again recursively, between 6-12 times, depending on how many tanks are in each module… The whole run takes 10-20 seconds to complete. I’m checked running two “instances” of the automation in parallel, which works fine :ok_hand:
As I’ve said above, I’ll be happy to show it live to you.

In the meantime - can you refer to my question? Is it possible to execute SQL somehoe within Tulip, meaning without any external system, to achieve the same in a more straightforward way?