Best Practices for Connecting Multiple Databases in Retool

Hello Everyone :hugs:,

I’ve been working with Retool for a few months now and I’ve had a great experience building internal tools for my team. However, I’ve recently hit a bit of a roadblock and could really use some guidance.

My current project requires connecting to multiple databases (both PostgreSQL and MySQL) and integrating data from these sources into a single Retool app. I’ve been able to connect each database individually, but I’m struggling with the best way to manage and query data from both databases simultaneously within a single app.

Some specific questions I have:

  1. Best practices for multi-database integration: What’s the most efficient way to set up queries that pull data from different sources? Should I be writing separate queries for each database and then merging the data in Retool, or is there a better method?
  2. Handling joins across databases: In a SQL environment, I would typically use a JOIN to merge data from different tables, but since the data resides in two different databases, I’m unsure how to replicate that behavior. Has anyone successfully managed cross-database joins within Retool, and if so, how?
  3. Data security and performance considerations: When pulling from multiple databases, what are the key security or performance implications I should be aware of? Are there specific settings within Retool I should configure to ensure smooth performance and secure access?

Any insights, examples, or gcp resources would be greatly appreciated! Thanks in advance for your help.