Dynamic Schema

Friday Demos · November 3, 2023 · 3:55

Transcript

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

  1. not quite there but we should be working end to end um is I've added this Dynamic schemas uh whatever capability and so you can express one or more Dynamic schemas uh you declare a from schema still trying to make sure we're using the right uh nomenclature here so this might change to something like Source schema or something like that uh so I can declare basically what is the canonical schema my um test database it's public and then I can specify the user attribute where the customer schema name should be stored for a given user so uh by adding this Dynamic schema is what we do is we go and look at the from schema and make a basically a virtual schema which is a copy

  2. of all the views in the from schema so these probably look familiar but they're actually sitting in the from schema um I went ahead and I'm only including Dynamic schema I don't need to do this but it just makes the the you know this is probably what customers will wind up doing because it's cleaner this is what they actually should be modeling against they shouldn't be modeling against the canonical schema or any of their customer schemas um and then what else did I have to do I go I to to get to the working demo I had to change the relationships so I had to scope all of the view names to Dynamic schema so basically every view name that's in this model is now

  3. scoped to Dynamic scheme or dynamic under under events or you know dynamic under under view name um and I had to update the topic similarly so that all of the object names are scoped to you know the references are in the dynamic schema and not in the default public schema uh once I do that I can jump into oh I'll have to create a new workbook from the model you can see that I've got my Dynamic order items view exposed and you know whatever I can select the oh uh oh oh wrong user attribute let's come back in here what did I set the user attribute as um Dynamic schema is the name of my user attribute so let me go and fix up this

  4. we'll save that and then refresh this and should work now and you can see the SQL that we're writing is is um you know here's the the name of the looker I'm sorry omn view that's a bad one the omn view is dynamic under under order items but the from table is public. order items and you know this will work with if you've got joins and all of that kind of stuff so that is my demo what what is our recommended workflow right now for people that want to test user attributes is it just to set it on yourself and sort of toggle it yes uh until we build like a pseudo or VI user yeah yeah it's just good the more we see this

  5. kind of stuff the more it's like it's going to be way easier if people can just sort of change their user dynamically and see it awesome