
Model layering / extending with abstract
The near-launch of abstract model objects - allowing complex model and field layering, and setting up the groundwork for remote dependencies in the data model
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
I can give a quick quick demo um so following on some of the abstract model object work we now have the ability to do uh abstract models entirely so not just views or fields that are uh you know the the logic associated with it we can actually do a full a full model you can imagine this being applied to kind of like a a hub and spoke uh uh you know process it does not currently uh manage any remote uh access so the project uh the uh model has to be on the the in the organization for for for us um and also two models today still have to be tied to a connection so they're a little bit less abstract than uh than maybe
we' like but we'll we'll we'll sort of relax this to but just just to show you've got now this abstract property on a Model I've got an abstract view that's defined here that's just creating a full name and like a some metadata on it um I've got another model uh here that's uh on the same connection today it it extends that current abstract model uh and then inside this user view it's referencing this abstract View and just to show you um what it looks like here here is that abstract field name being pulled through so we're effectively able to um have a little bit more of a dry uh you know don't repeat yourself process to Define these things you can imagine this being like
a templated analysis you know you could have complicated uh Logic for for you know applying a certain definition for a metric or a certain definition for a dimension um across multiple different tables or multiple different departments or something like that so that's that's the the start and we'll keep we'll keep uh you know uh we'll keep iterating on this so that you can do things like you know reference a potentially a model that's in you know git and you can have sort of more a little bit more um abstraction and manage that process too are there any broad changes we plan to make to uh like remote dependency stuff the relative to like uh relative to looker um uh like is there stuff that we
F like that we feel like we got wrong the first time that we need to adjust our philosophy on I mean the editing experience for Looker was truly terrible like our composed uh you know IDE is a really elegant way to effectively have these these multiple different layers extending each other and having composition um would love to figure out a way to get get that in into our editing process so like you can see effectively the resolved object that that uh you know we say you know you're in that user's view you pull in full name you can see that object and potentially even edit that object but it'll basically be just a diff on top of it too um which is sort of intrinsic
to it won't work out of the box but it's intrinsic to how our IDE works so it should should be um doable to do that aside from that you know I don't know Stephen I don't know if you have any thoughts to and also to Ste Stephen was instrumental in this as as as always so thank you and Conrad to helped help out a bunch for the thoughts uh yeah I don't haven't really thought about it a lot um I don't think there's anything wrong with pointing it at a get repo rather than having something on the same instance but don't yeah yeah I yeah we'll probably have to do some package management like version versioning so like hey you know pulling in a specific
version of a remote project and updating that but uh I I don't I don't have I don't have firm views of of what we should improve yet either is the idea that it would always be elements of the shared model that live in the in these abstract models I so not necessarily it could potentially you could imagine having other layers too um so like you can imagine having if you're replicating uh Facebook ad data from five Tran you know we have a schema model that we automatically infer from the data warehouse you could apply also uh a model potentially below the schema model or below the shared model on top of the schema model that would look something like a template analysis or block that
you'd see inside looker where like you're building predefined things that could then be you know they could be abstract things that are applied directly to the tables they could also be uh non-abstract you know sort of more direct on top of uh you know specific tables that are present inside that that five five Tran um schema I I I don't actually know we have not just to be clear to we have not built built that yet this will allow for sort of like a crude Hubb and spoke kind of a a workflow you could Define you know an encapsulate logic you know for the central organization in in one place and then basically apply that to a bunch of different uh you know tables or
or or interfac um but like there may be more elegant ways to do that to you know sort of in a layered approach also just thinking about some of the use cases you get sometimes with like let's say I'm a game studio and I've have lots of different games and I've lots of different like they've got let's say a data set across each of those games um and it's the same I think some of them might want to put some of the schema model stuff in there just for brevity I know it won't make a difference from a functional perspective but they might prefer to not have those fields even though they're not really maintaining those fields to not have those fields be repeated over
and over again in each few file but um anyway yeah that's that's just a I I think I think that like that's completely reasonable too and we may want like the abstraction to be you know sort of low like a lower level uh too so it's a little bit a little bit easier to reason about so yeah I think that's kind of probably a little bit to be determined um but like certainly want to improve this and make sure it's easy to like the the dev experience I think is actually kind of of the most important feie like we've got all of the Power already really even in like our you know query workbook shared schema models you can kind of do a lot of
composition and a lot of uh reuse of logic we just want to make it so that it's easy to develop in also and that's a that's a really good point though Liam that we need to think about what exactly shows up in git for one of the things that is inhering off one of these because it's kind of weird if there are some choices to be made there for sure of like what exactly do we show to the user as this is the model yeah so yeah and maybe worth noting too just along those lines these things can be like nested uh extensions also so like you could have an abstract view that's extended by another abstract view that's extended by another abstract you know
sort of uh you know on on on and on to to allow for some encapsulation and sort of dry logic but it's uh yeah the dev experience there at least today would you just have to keep it all in your head as opposed to uh being able to see the resolution of it