
Topic joins
Omni tries to make joins as reusable as possible, but sometimes you just need a special join for a given topic. Now joins can exist globally in the relationships file or inside an…
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
100% we'll just do all of it I can share what I've been working on yeah um also live demo so be warned choose what to share think you want Chrome is over here all right so suppose I've got a model and I've got some topics and I want different relationships for different topics or aliases or whatnot to show up differently in a different topic context then maybe I want to Define my relationship inside of said topic context so you can see I removed a relationship come over here Define some relationships within the order items topic uh you can see my warning goes away and I can get a new workbook and tada I have orders and if we go look at the SQL you'll see
that my SQL wear condition that's in the relationship is on so it's actually picking up that relationship and doing validation against it what's happening is these relationships when you're making when you're asking for metadata about a topic or when you're querying within a topic context these relationships are getting added to the model level relationships um and that is that so are they going to override if there's a collision yeah so we're still trying to figure out what the what the right merge behavior is the current behavior that I uh have implemented is the topic will override the model level and and will warn about the conflict yep um ultimately what I think we want is uh to actually be able to extend from a model
level relationship um probably like by ID or something like that reference the ID of the model level relationship so so some more flexibility around what what to do there but the current behavior is override and warn about the duplicate this is crazy yeah is there a world where we would be able to essentially promote from a topic to the full relation reltionship file like is there any reason that we wouldn't be able to do stuff like that um you mean promote a given relationship from yeah like let's just say someone builds their model I'll say like wrong in air quotes and they put all of their relationships in topics and then they're like okay I want to organize these and actually make a central library
and move like move these out of topics into the relationships file I'm assuming that like the form of that the the format of them is paired and like we would just be able to essentially copy and paste them from one other copy and paste right now if you do that um the indentation screwy okay you know that's that's a relatively small constraint yeah yeah yeah but be besides that of course you can just go into the ID and do ID and do it I mean in theory we could have a model mutator method if we wanted it to be UI based but I don't think that's going to be a common occurrence yeah yeah no I mean this is just U like it gives us
amazing flexibility to let people again like model the way they want to but still you know dig themselves out of holes they build for themselves yeah and I think it it's it just moves more towards topics being this curated experience and and then yeah once once we get the ability to extend these things um they they become more reusable and I I know that um you know somebody might be working on on stuff that moves Us in that direction as well y I'm trying to get it ready for a demo but I don't think it's gonna happen today unfortunately would our would our new recommendation then be if you have a specific top a topic specific alas that you should probably put the join in
the topic like this um and thus like leave a lot of aliasing potentially out of the main model unless they are Global aliases in some sense I think that's probably right I mean we should write some little style guides you get to where you actually want to use that in more than one topic it yes that makes a ton of sense and that's like probably the movement thing that I'm talking about a little bit because like aliases are just brutal they're just they require too much thought um and so I feel like this solves a lot of the stuff around just how difficult it is to understand an alias yeah along with this change we'll be doing some stuff to make the top a little
bit more restricted to what's actually in in the topic so that that's coming too very cool I kind of love that we're just doing everything