I have a question regarding data manipulation in Retool

I have a question regarding data manipulation in Retool.
I have two different queries, each extracting data from different databases, resulting in two tables accordingly. I need to merge the data from these two tables into one.
How can I accomplish this task in Retool? Are there any special tools or methods I should use for this?
I would appreciate any assistance and recommendations.
Thank you!

Hey there. I think you'd have two options, depending on the size of the dataset.

  1. For a smaller dataset, query both databases and use Javascript to do your transforms. From there you can display the data or insert it into a DB for use later. This will become less performant as dataset size increases though, as you're running all of this in the browser rather than the server.

  2. For a larger dataset, you could use the built in Retool DB to store the raw data immediately upon querying and run your join and transforms in SQL where the server does the work and you only handle the transformed data on the frontend.

For the latter option maybe consider Retool Workflows and doing this operation in batches to avoid having to wait through the fetch and insert process.

Hope this helps!