Bug: Unable to access Retool Databse Schema when changing environment

Hey there,

Odd behaviour: I have a Retool DB that's perfectly synced between my Production and Staging environments.

BUT, I'm unable to access my tables via the Retool DB Ressource on a Loop Module. The table that is supposed to be there just doesn't appear.

When I select Production, I'm able to select the correct table, and when I switch back to staging, the table value is still selected but all key/value fields show "No Data" (note that I'm using the GUI module).

Capture d’écran 2024-08-29 à 09.50.41

What's very confusing is that I already have a Retool DB Ressource connected to this exact table I'm trying to access in this new module, prior on the workflow.
The scehma refresh button from the Workflow shows "Fetched 16h ago"
Capture d’écran 2024-08-29 à 10.08.11

Any idea on what's going on?

Best
Hugo

Hi @H_L, by 'Loop Module,' do you mean a Loop block? The Loop block will iterate over the output of the Resource query block, but the latter would have to run after the environment change for the Loop block to iterate over the correct output.

We should be able to change environments at the bottom left of the UI:

The Schema tab on a Resource query block should automatically update when the environment is selected. Using the GUI mode, the table selection should also update automatically:


However, the 'No data' under filter by will show up when the table does not exist on the environment. For example, the sample_users table from the example above does not exist on my test env:

After a Schema migration, in my case I migrated the memes table to production, we do have to refresh the page (Workflow) for the Resource block to list the new table.

Schema migration:

After refresh:

Thanks Paulo for your answer. Loop Module was indeed Loop Block :slight_smile:
As you can see in my initial post, all the steps you describe were done.

I think the bug has been resolved by itself, the staging schema is now correctly fetched from retool db to my workflow.

You are welcome! Happy to hear the issue went away. Please let us know if it happens again. :slightly_smiling_face: