How to setup separate mongodb connection for staging and production environments?

  1. I am using two mongodb resources in my project (StagingDb and ProductionDb). I want to acheive something like when I toggle between retool's production and staging environments, it should pick up respective mongodb resource automatically (i.e for production environment it should use ProductionDb resource and for staging environment, the StagingDb). How to configure environments to acheive this ?

  2. Also, when I am making changes in application in the staging environment, it is getting reflected in application in the production environment too and vice-versa. Is there any way to use staging and production environments in isolated manner so that staging application has the features that are yet to be tested and they should not reflect in production application ?

@suresh.kumawat
Have you read this: Using multiple environments