Better schema model handling with dynamic connections

Conrad Slimmer · Friday Demos · January 17, 2025 · 6:46

Bit of refinement to the model and admin process with dynamic schemas.

Try it yourselfThe full week on docsadministrationmodeling

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. oh good uh I have a demo before we wind down I can never find the right thing there we'll do this one all right how's everybody doing today good good uh okay just right now just kind of showing set up so that you everybody has a in their head what's going on I've set up um I'm building on top of the dynamic schema or sorry Dynamic connections that Stephen released a month or two ago uh and basically you can see I've got this Dynamic connection user attribute for my user I've set my value to public only uh and then I want to just show the configuration for the two con actions just so people have in their head what's going on uh first off I've

  2. got this public only connection so this is the the one that my user is going to swap in the connection for this um this Omni connection or whatever database connection uh and then I also have my this is like my main model that I'm actually going to be looking at the model so this is the connection for the main model uh the only only difference between these just for demo purposes is that in the public only connection I'm actually using all the same credentials and stuff which is probably not how people in general would use this feature uh but in here I'm only going to generate the schema uh the public schema so whereas in this main model connection I haven't um limited my included

  3. schemas to only generating the public so uh in in my model I've also got whatever are all types and there's there's two two other schemas in in in my main model uh and so then the other thing the new thing what I'm actually showing here you can see my configuration I've got this uh this PG public only connection as a connection environment set up to come on dynamically if my user attributes public only so my user will will show that I've added this new toggle new setting to the uh connection environment setup this used schema connection environment uh so in the current implementation this is actually how we released this was that the uh whatever connection you're switching into whether dynamically or through the non-dynamic

  4. uh just Branch based connection environment switching that we allow we would actually swap in whatever the scheme model is for the active connection for your current you know user workbook IDE wherever you're at would get the schema model from from the um the connection that's that's active for you so uh this is the default just to show things working we'll jump over here I'm in a sorry where am I I'm in a workbook IDE you can see I'm in the workbook my current uh state of the world is that I am switching as you can see I am switching the schema model like I say that's the default that was our old default the new default will actually be to not switch the schema model

  5. uh but we will set the value to on for everybody who's already configured this stuff so they will have continuity with their um with their configurations so nothing will change for people's existing configurations but anybody who comes in and sets up new connection environments will will default to not switching the schema model so here I am again in my workbook IDE and I'm just going to refresh the page to pick up that connection environment change that I just made to not switch in the schema model and you can see that now I am picking up the schema model for my main model my default model the default connection for the model but I am still using the connection credentials for the connection environment that's getting

  6. swapped in uh same thing for like if I'm in a branch we will use the same setting to determine the behavior for the branch switching feature that we have the um so that's kind of like what the different behaviors are why did we do this well you know I think one people should be able to choose there's different use cases where you might want this or not want this uh and then the other piece is that um just gonna turn this back on real quick if we come back in here you'll see that uh I have this branch-based schema refresh setting that I uh released a few weeks ago that goes along it's requirement for doing the system sync required for for git to um

  7. or P request required for system syncs for basically uh named mainess git but if you are in the the default mode where we switch the schema models we will not allow you to turn on Branch based schema refresh because what does it mean if I'm doing the branch schema refresh in my main schema model in this connection but not in my other one uh so if I come back in here and Swap this off now I wonder if it actually oh it actually so now I am able to turn Branch schema Refresh on and off uh so that means that now Branch schema refresh and Main list git is now compatible with both Dynamic uh connection swapping as well as just the branch-based connection swapping

  8. so that is the end of that this will be landing uh I still have to write some tests but it'll be landing early next week