Meeting Title: Inventory Adjustments PR Review Date: 2025-07-02 Meeting participants: Demilade Agboola, Emily Giant


WEBVTT

1 00:00:44.290 00:00:46.579 Emily Giant: Good morning or afternoon.

2 00:00:49.630 00:00:50.640 Demilade Agboola: Hello!

3 00:00:51.390 00:00:52.390 Emily Giant: How’s it going.

4 00:00:53.420 00:00:55.492 Demilade Agboola: Oh, it’s pretty okay.

5 00:00:57.070 00:01:01.080 Demilade Agboola: bit tired. I I didn’t end up sitting at like 4 am. Last night. I.

6 00:01:01.080 00:01:12.230 Emily Giant: Oh, yeah, I knew you were. I knew you were on one last night when you wrote at like 7 o’clock. I was like, well, it’s already at the middle of the night for him. So that’s not good news.

7 00:01:12.230 00:01:22.069 Demilade Agboola: No, I I was just in like some flu state, and I knew that if I went to bed and I woke up to like this morning to like. Continue, it might not be the same.

8 00:01:22.260 00:01:26.530 Demilade Agboola: Yeah, get it out and then go to bed.

9 00:01:26.830 00:01:49.029 Emily Giant: I know that feeling, and if I go to bed when I’m like that I won’t sleep very well. My head will go like I’ll just see sequel in my sleep, and it’s not a good sleep. It’s just frantic. So yeah, do you want to review the Pr together so we can just commit it and have those adjustment types.

10 00:01:49.610 00:01:54.719 Demilade Agboola: Yeah, sure. Let me share my screen so I can walk you through what I did.

11 00:01:56.230 00:02:09.110 Emily Giant: I was like the opposite. Last night was the 1st night I’d slept, and since Friday, because I have such bad poison ivy that whenever I lay down. I’m just like itching. It looks a lot better today, though you can see

12 00:02:09.360 00:02:10.899 Emily Giant: like this is my bad.

13 00:02:11.200 00:02:11.810 Demilade Agboola: Yeah.

14 00:02:11.810 00:02:16.780 Emily Giant: But it’s like everywhere it’s like in my kneecaps

15 00:02:16.990 00:02:22.490 Emily Giant: like it’s so much better, though, because I’m on steroids. But I was sanding my floor.

16 00:02:22.600 00:02:23.900 Emily Giant: Isn’t that gross.

17 00:02:23.900 00:02:29.200 Demilade Agboola: Are the other spots that like are colored? Do they hurt, or do they age, or is it just like all over.

18 00:02:30.230 00:02:31.890 Emily Giant: They itch like

19 00:02:32.290 00:02:46.969 Emily Giant: like fire. Ant itch. It is so aggressive. I’m just allergic to everything, but I like being outside and pretending like I’m not. And so I get myself into these circumstances, and then

20 00:02:47.070 00:03:04.240 Emily Giant: then I go on steroids, and I’ll be really productive this week because I want to kick it. But then I can’t sleep, because I’m like all roided up. So last night I finally fell asleep after like 3 days of not. But

21 00:03:04.350 00:03:07.040 Emily Giant: okay. Do you want to share screen and.

22 00:03:07.570 00:03:10.609 Demilade Agboola: Okay, let me share my screen.

23 00:03:15.450 00:03:16.380 Demilade Agboola: Alright.

24 00:03:18.440 00:03:26.219 Demilade Agboola: so I didn’t change what you had already done on that branch. I just added to it based off what I needed to do.

25 00:03:28.590 00:03:37.589 Demilade Agboola: Gotcha. So couple of things there were like 2 main things I did. One was, I added, a seed

26 00:03:37.940 00:03:40.520 Demilade Agboola: full of like the mapping that you.

27 00:03:40.520 00:03:41.150 Emily Giant: Connect.

28 00:03:41.150 00:03:41.723 Demilade Agboola: Pretty good.

29 00:03:42.130 00:03:51.189 Demilade Agboola: So the the logic is if it’s here, just use this, if it’s here, just use that. So you don’t have to keep doing like case when statements.

30 00:03:51.480 00:03:53.010 Emily Giant: Nice. Okay.

31 00:03:53.625 00:03:55.829 Demilade Agboola: I find that, like Nita, and like.

32 00:03:55.830 00:03:57.760 Emily Giant: It is. Yeah, that’s great.

33 00:03:57.760 00:03:58.720 Demilade Agboola: We have to do

34 00:04:00.170 00:04:08.529 Demilade Agboola: so so that’s the seed I then started to use that here. So staging inventory adjustment is where.

35 00:04:08.730 00:04:11.869 Demilade Agboola: like a staging model where we have

36 00:04:12.070 00:04:15.620 Demilade Agboola: that. So what I did was, I joined it to the seed.

37 00:04:15.910 00:04:17.200 Emily Giant: Oh, nice. Okay.

38 00:04:17.209 00:04:22.069 Demilade Agboola: Of the adjustment. Basically, it would map to the adjustment type if it’s receiving that.

39 00:04:22.229 00:04:28.939 Demilade Agboola: And then I then basically said, Hey, it’s going to be the parent adjustment type as the adjustment type.

40 00:04:29.209 00:04:36.189 Demilade Agboola: And if it’s not, if there’s no match which because I pointed out to you that there are some times, where, like some things, do not match.

41 00:04:36.949 00:04:42.049 Emily Giant: That case, just use the, you know, the default adjustment type that came with it.

42 00:04:42.910 00:04:51.039 Demilade Agboola: So that’s the adjustment type. So we now have a foundation of adjustment types that we across different models as we as we deem fit

43 00:04:54.780 00:04:59.009 Demilade Agboola: And so I then use that in

44 00:04:59.460 00:05:03.590 Demilade Agboola: a number of them. So so shopify.

45 00:05:04.170 00:05:08.740 Demilade Agboola: Basically, I am calling the adjustment type.

46 00:05:09.420 00:05:14.589 Demilade Agboola: But I also know that I don’t know if you want to keep this logic of some of this.

47 00:05:15.520 00:05:18.489 Demilade Agboola: or you just want me to use only the adjustment type.

48 00:05:19.260 00:05:26.519 Emily Giant: That those won’t come through as an adjustment type. So in the old

49 00:05:26.920 00:05:36.380 Emily Giant: table there was adjustment type called sales, subscription, etc. But in the new one. You have to like hard code. It. So

50 00:05:36.730 00:05:38.730 Emily Giant: it just depends on

51 00:05:40.570 00:05:47.510 Emily Giant: like, if the seed file covers that the thing is like that’s not going to come through as an adjustment type. It will be blank.

52 00:05:48.034 00:05:50.950 Emily Giant: And you have to use those other parameters like.

53 00:05:51.830 00:06:00.979 Emily Giant: does it have a redelivery of number. Does it have a subscription number? Those are the only ways to identify that kind of adjustment.

54 00:06:02.280 00:06:06.890 Demilade Agboola: Okay. So I’m asking cause I, it seems like we just take this out. Then.

55 00:06:07.750 00:06:08.380 Emily Giant: Yeah.

56 00:06:08.790 00:06:11.810 Demilade Agboola: Okay. Cause again, I I didn’t know

57 00:06:12.870 00:06:22.879 Demilade Agboola: because this would 1st try and check if you know the for that, like lot, if there’s the record type of sales order. If there’s a redelivery of.

58 00:06:24.050 00:06:35.859 Demilade Agboola: Yes. So you basically go through this logic first, st when it’s like, okay, none of them hit the adjustment types which is based off the mapping in this.

59 00:06:36.730 00:06:37.290 Demilade Agboola: Okay.

60 00:06:37.290 00:06:45.219 Demilade Agboola: to know if this is still like technically stuff, we should consider if we just like, you know what? Let’s just use the mapping based on, like the mapping industry, completely.

61 00:06:45.890 00:06:46.669 Emily Giant: Can.

62 00:06:47.560 00:06:52.680 Emily Giant: Well, it’s a different field that it’s referencing.

63 00:06:53.130 00:06:58.449 Emily Giant: Like record type is not adjustment type. It’s a different table. So

64 00:06:58.750 00:07:02.220 Emily Giant: I think it has to stay because of that.

65 00:07:02.510 00:07:06.260 Demilade Agboola: Okay, that’s fine. As again, I that’s probably why I kept it. Because I

66 00:07:06.420 00:07:10.930 Demilade Agboola: I do not know if, like it was like an overlap or.

67 00:07:10.930 00:07:11.660 Emily Giant: Cheers.

68 00:07:12.430 00:07:17.330 Demilade Agboola: These are not like properly mapped in the adjustment type. So we need to be able to map them properly.

69 00:07:17.560 00:07:38.769 Emily Giant: Yeah, there are a couple of things that won’t map just from adjustment type. And it’s sale redelivery subscription. And then the buffers like they used to map from the adjustment type. And that’s 1 of the things in that like article that I posted in the ticket just like writing out a little bit of how it changed

70 00:07:39.121 00:07:50.380 Emily Giant: prior to the migration. The buffers were in that table, but after the migration we have to use the Int. Buffer count model in order to reference buffer as an adjustment type.

71 00:07:50.950 00:07:51.970 Demilade Agboola: Yeah, yeah.

72 00:07:51.970 00:07:57.779 Emily Giant: We already have that it’s already in the mark model. So you don’t really have to do anything outside of

73 00:07:59.590 00:08:09.339 Emily Giant: like, for historicals do like a coalesce or something like that, like if buffer type is

74 00:08:10.020 00:08:18.477 Emily Giant: prior to. I think I put the dates in there, too, in the article, so that you didn’t have to like go fishing for when it stopped working.

75 00:08:19.580 00:08:22.899 Emily Giant: So that would be one of the only adjustments there with buffers.

76 00:08:23.790 00:08:32.809 Emily Giant: And honestly, I don’t know how much people even care about historical buffers. But like, while we’re here doing the historical tie in might as well.

77 00:08:34.789 00:08:35.700 Emily Giant: Okay.

78 00:08:35.860 00:08:39.630 Demilade Agboola: Okay, so that

79 00:08:39.940 00:08:46.349 Demilade Agboola: fine, I I will still have to put them the buffer account into buffer accounts for hold on that. I just want to do this for

80 00:08:47.590 00:08:49.159 Demilade Agboola: all the other stuff.

81 00:08:49.160 00:08:57.259 Emily Giant: Yeah, this is still great, though like, and there’s no fire, you know, with the buffer, since we already have that adjustment type in the mart model.

82 00:08:58.190 00:09:00.830 Emily Giant: simply adding that historical context.

83 00:09:01.740 00:09:05.010 Demilade Agboola: Yeah. And then, so here

84 00:09:05.430 00:09:12.779 Demilade Agboola: I did the group in into adjustment types. So I also, before we go to that for sales.

85 00:09:13.310 00:09:15.510 Demilade Agboola: I basically have the same logic.

86 00:09:18.400 00:09:24.529 Demilade Agboola: But now, instead of referring to the mark model, which I just kind of made the mark model

87 00:09:25.040 00:09:26.679 Demilade Agboola: bit in here.

88 00:09:27.740 00:09:28.550 Demilade Agboola: Space.

89 00:09:28.780 00:09:32.099 Emily Giant: Yeah, everything I needed is kind is here.

90 00:09:34.370 00:09:39.740 Emily Giant: Yeah, moving it out of that already. Long model is a good call.

91 00:09:40.290 00:09:44.599 Demilade Agboola: Yeah. And so now again, the same concept is still here

92 00:09:44.710 00:09:49.910 Demilade Agboola: about like this logic. And then, if not, we rely on the inventory adjustment types that we’ve created.

93 00:09:51.490 00:09:52.330 Emily Giant: Yeah.

94 00:09:54.390 00:10:00.410 Demilade Agboola: And so once we do that, we have that done here.

95 00:10:02.470 00:10:09.280 Demilade Agboola: This is shopify. Why, salesforce it’s here.

96 00:10:09.670 00:10:14.189 Demilade Agboola: Alright. So for salesforce we have like we’re getting from postgres.

97 00:10:16.420 00:10:19.319 Demilade Agboola: So now we’re doing the same thing. But instead of using.

98 00:10:20.160 00:10:23.089 Demilade Agboola: we’re not, we’re not. We’re using the but join based off

99 00:10:23.200 00:10:30.270 Demilade Agboola: the 1st column, not the second column, which is postgress, adjustment, type.

100 00:10:31.510 00:10:36.310 Demilade Agboola: So again. Here I’m keeping things the same.

101 00:10:37.020 00:10:41.559 Demilade Agboola: But then give me one second.

102 00:10:42.350 00:10:49.180 Demilade Agboola: But then I added the mapping, where’s the mapping?

103 00:11:05.180 00:11:06.835 Emily Giant: Where is that mapping.

104 00:11:09.670 00:11:10.940 Demilade Agboola: Could be here.

105 00:11:17.010 00:11:19.129 Demilade Agboola: Okay, yeah. So this is the join here.

106 00:11:19.530 00:11:20.330 Emily Giant: Yeah.

107 00:11:23.000 00:11:31.340 Demilade Agboola: So it’s basically, oh, yeah. So this is the join here. And so at this point, where we have

108 00:11:31.570 00:11:33.300 Demilade Agboola: everything union.

109 00:11:38.120 00:11:44.050 Demilade Agboola: So once you have everything unioned. So this is like the legacy salesforce union.

110 00:11:44.410 00:11:45.150 Emily Giant: -

111 00:11:45.150 00:11:49.500 Demilade Agboola: And then join it to the raw adjustment type.

112 00:11:50.770 00:11:55.469 Demilade Agboola: And then call the mapping the parent adjustment type basically.

113 00:11:55.800 00:11:57.500 Emily Giant: Okay, yeah, that makes sense.

114 00:11:57.840 00:12:09.349 Demilade Agboola: And so the same thing kind of works here. So we do where the delivery of is no, their delivery. When Id is not. Know, then, subscription, all of that

115 00:12:10.367 00:12:18.999 Demilade Agboola: and then, if none of these match, which is kind of the what was logic before, use.

116 00:12:19.640 00:12:20.340 Emily Giant: Hmm.

117 00:12:20.630 00:12:23.569 Demilade Agboola: And the backup is the initial adjustment that it came with.

118 00:12:24.050 00:12:25.839 Demilade Agboola: And then we end it as a percentage.

119 00:12:27.250 00:12:28.070 Emily Giant: Looks, good.

120 00:12:28.970 00:12:34.110 Demilade Agboola: So that’s what we did there and then.

121 00:12:39.140 00:12:42.880 Demilade Agboola: Yeah, this is. These are the changes you made, I believe.

122 00:12:43.120 00:12:45.679 Demilade Agboola: from quantity reconcile to adjustment quantity.

123 00:12:45.910 00:12:46.470 Emily Giant: Yeah.

124 00:12:46.780 00:12:50.410 Demilade Agboola: Yeah. So that’s still there. Didn’t change that

125 00:12:53.100 00:12:55.310 Demilade Agboola: And then eventually adjustments.

126 00:12:55.520 00:13:00.290 Demilade Agboola: Yes, instead of having the inventory adjustment table.

127 00:13:01.690 00:13:08.539 Demilade Agboola: In A in like an entirely separate space where the Union was going on, I created a model for that

128 00:13:08.920 00:13:16.330 Demilade Agboola: called In’s Invest Inventory Adjustments Union, where we’re unioning the shopify and the salesforce.

129 00:13:18.560 00:13:24.949 Demilade Agboola: So because before we had inventory adjustments as a table, all of our in like

130 00:13:25.110 00:13:27.290 Demilade Agboola: base or something, give me one second.

131 00:13:27.290 00:13:28.925 Emily Giant: Yeah, it was

132 00:13:32.880 00:13:37.619 Demilade Agboola: Cause. I saw the flow, and I was like this might become harder to maintain.

133 00:13:37.620 00:13:38.460 Emily Giant: Yeah.

134 00:13:41.200 00:13:43.280 Demilade Agboola: Give me one second.

135 00:13:45.040 00:13:47.239 Emily Giant: I think it’s in the mart model in there.

136 00:13:47.460 00:13:56.309 Demilade Agboola: They’re like, yeah. So before, yes. So we have the inventory inventory adjustments.

137 00:13:58.470 00:14:10.130 Demilade Agboola: And then we had a model called inventory adjustments. Inventory adjustments. Here is in postcard space inventory adjustments, which is basically the union of these 2 models.

138 00:14:10.130 00:14:10.670 Emily Giant: Yep.

139 00:14:11.280 00:14:15.789 Demilade Agboola: And I was like, I think, that might become harder to maintain, especially like this is out.

140 00:14:16.420 00:14:17.840 Demilade Agboola: Yeah, it’s in.

141 00:14:17.840 00:14:23.820 Emily Giant: That was a patch like I left it bare because I was like, I know, we’re gonna redo this and

142 00:14:24.570 00:14:29.149 Emily Giant: yeah. So heard it was never supposed to be there.

143 00:14:29.440 00:14:34.640 Demilade Agboola: Yeah. So I I just created new model, which is literally the exact, like duplicate of that model

144 00:14:35.240 00:14:38.990 Demilade Agboola: just in like a more structured way that fits, how we.

145 00:14:40.400 00:14:41.060 Demilade Agboola: This

146 00:14:43.350 00:14:46.910 Emily Giant: And then so it based off the suborder ids.

147 00:14:47.250 00:14:50.629 Demilade Agboola: And then what else? What other changes did I make?

148 00:14:55.390 00:14:58.469 Demilade Agboola: Yeah. So for sub order

149 00:14:59.200 00:15:09.819 Demilade Agboola: and aggregate adjustment types replace the map model with the actual calculations that make up the pre-delivery subscription sales quantity.

150 00:15:10.590 00:15:11.560 Demilade Agboola: Alright.

151 00:15:12.120 00:15:17.530 Demilade Agboola: I just use that. So I am now using what we’re getting from inventory adjustments.

152 00:15:17.700 00:15:19.600 Emily Giant: Adjustment type.

153 00:15:19.850 00:15:26.409 Demilade Agboola: So now, when we do our call s adjustment of categories, it goes to spoilage, which we’ve done from the base model.

154 00:15:27.170 00:15:33.839 Demilade Agboola: we’re able to get our spoilage quantity, shrinkage, quantity system, mismatch directly from the

155 00:15:34.200 00:15:38.380 Demilade Agboola: staging model, from polytomic that we’ve already mapped to our sheet.

156 00:15:38.600 00:15:43.959 Demilade Agboola: So that gives us this the different quantities that we need.

157 00:15:44.610 00:15:45.400 Emily Giant: Nice.

158 00:15:45.590 00:15:47.290 Emily Giant: Okay. Yeah.

159 00:15:47.510 00:15:52.270 Demilade Agboola: Oh, basically, that was basically what I was working on yesterday.

160 00:15:52.990 00:15:55.432 Emily Giant: Yeah, that all looks really good.

161 00:15:57.210 00:16:02.270 Emily Giant: I can do Qa on that today, just to make sure that, like, it’s all

162 00:16:02.400 00:16:11.239 Emily Giant: looking the way that we think it will. I’ll yeah. I’ll try to push that through like this morning this afternoon.

163 00:16:11.370 00:16:14.765 Emily Giant: but that looks good. The one thing that

164 00:16:15.980 00:16:42.400 Emily Giant: we could still, and there’s no need to do it now. It’s not like in the way of anything, but there are some fields there that are like deprecated. I don’t think that matters. We can leave them in case somebody wants them, for, like historical context. But like the checkout order number, and like some of the fields from the postgres table. We don’t use going forward. But again, it’s no problem to leave them there, but

165 00:16:42.500 00:16:59.050 Emily Giant: the fields that I had to sub in to make it work with the shopify stuff are like not exactly a 1 to one like the inventory adjustment date is the fulfillment date in the new model. And so it

166 00:16:59.090 00:17:23.089 Emily Giant: I don’t even think anyone uses them, so it doesn’t matter, but like might as well leave them for now, because they’re not hurting anyone, and it will keep the historical reports working. If somebody needs them. It just might not like be a complete one to one if they’re trying to like Comp year over year. And then the 4 count and 4 stock. I don’t even know what those are. They came directly from the source, and

167 00:17:23.170 00:17:31.780 Emily Giant: there were only ever a 0 or a 1. So it seems like some kind of Boolean situation, but like I do not know what those are.

168 00:17:32.980 00:17:40.609 Demilade Agboola: Yeah, I mean, we could always like, if if we look at numbers, and we see like everything’s fine, we could go through the different columns on message French kind of like eliminate them.

169 00:17:40.880 00:17:41.530 Emily Giant: Okay.

170 00:17:41.700 00:17:42.100 Demilade Agboola: This is.

171 00:17:42.100 00:17:47.459 Emily Giant: Yeah, they’re not hurting anyone right now. So it’s fine. And this is

172 00:17:48.330 00:17:52.430 Emily Giant: a huge win to like, get this up and running. So

173 00:17:53.586 00:17:58.630 Emily Giant: just need to go into the what do we want to do with the

174 00:17:59.140 00:18:16.449 Emily Giant: current inventory adjustment mart model? That’s just the polytomic data like, there’s kind of these 2 different things alive. Right now, there’s this, which is what we’re going to need to move to, since it has the historicals tied in. But then there’s also, like the Mart underscore underscore inventory adjustments.

175 00:18:16.590 00:18:19.100 Demilade Agboola: And I want to make sure that we’re not losing any of.

176 00:18:20.200 00:18:23.900 Emily Giant: That context from this model.

177 00:18:24.150 00:18:35.019 Demilade Agboola: Yeah. So what we can do is, I think this model has some numbers that that model doesn’t. So we can try and like, join what we have here into that Max model.

178 00:18:35.020 00:18:36.320 Emily Giant: Gotcha. Okay.

179 00:18:36.320 00:18:46.630 Demilade Agboola: Well, same like we don’t want to collect. Well, we don’t want to get the data from the mark, because I don’t. They want to add data into that model from intermediary models that, like.

180 00:18:46.630 00:18:47.340 Emily Giant: Sense.

181 00:18:47.850 00:18:48.330 Demilade Agboola: So.

182 00:18:48.330 00:18:53.859 Emily Giant: So instead of like having this like union thing, we’re gonna take these and plug them into the model.

183 00:18:54.190 00:18:59.490 Demilade Agboola: Yeah, so we have the, where’s the

184 00:18:59.800 00:19:06.939 Demilade Agboola: particular model? I believe it’s this, yeah, where we’re having the inventory adjustments union.

185 00:19:07.180 00:19:09.680 Demilade Agboola: or like where we have the

186 00:19:11.170 00:19:15.510 Demilade Agboola: the adjustment types where we have the sum of the different categories.

187 00:19:16.300 00:19:17.040 Emily Giant: Yeah.

188 00:19:17.040 00:19:28.860 Demilade Agboola: Join it back based on eventually id back to that mark model and then go. Yeah, this is the full like, quantity sold subscription quantity, redelivery sales, quantity, all that stuff.

189 00:19:29.380 00:19:32.279 Emily Giant: Gotcha. Okay, yeah, that makes perfect sense.

190 00:19:32.630 00:19:35.471 Demilade Agboola: So that allows us to be able to to do that this way.

191 00:19:37.926 00:19:39.629 Emily Giant: Yeah, that’s great. So.

192 00:19:39.630 00:19:46.279 Demilade Agboola: Numbers here, we can join you back. We can join you back to that table, and everything’s good to go.

193 00:19:46.950 00:19:53.970 Emily Giant: I dig it. Yeah, it looks good. It makes perfect sense. Felipe will be a very happy person.

194 00:19:55.158 00:19:57.109 Demilade Agboola: Is there anything else left to do.

195 00:19:58.109 00:20:12.869 Emily Giant: For inventory. Let me pull up my notes. The only thing that comes to mind immediately is a little bit what we touched on yesterday, which was like the existence of 2 mark models, and trying to decide if

196 00:20:13.170 00:20:17.670 Emily Giant: they should coexist or be

197 00:20:17.800 00:20:27.249 Emily Giant: set up differently in looker. I was having those aggregation problems between the suborder level or this adjustment level data and the lot level data.

198 00:20:27.480 00:20:45.949 Emily Giant: And you had mentioned that like, this is all the same information, just like different levels of detail, essentially. And I think that’s a really good point. But I am having trouble figuring out how to like control the fan out when I try to like.

199 00:20:46.740 00:21:01.729 Emily Giant: add, with all of these sums, whenever I try to pull it on the lot level instead of the suborder, level it like fans out in looker and like multiplies all of the sums, times, the amount of orders that are in the lot.

200 00:21:02.502 00:21:07.160 Emily Giant: I don’t know if that’s a local layer problem, or if that’s something that I can better control in Dbt.

201 00:21:07.600 00:21:18.299 Demilade Agboola: Is there? But my question? I think the question would be, how do we? That’s why I kind of asked yesterday, how do we join Lot id to support ids on a very clear one to one mapping.

202 00:21:18.930 00:21:21.460 Emily Giant: In Dbt, or in looking

203 00:21:22.800 00:21:32.770 Emily Giant: I have joined them using inventory number Id, which is gonna cause that fan out right? Because it’s gonna do the inventory number

204 00:21:33.290 00:21:37.155 Emily Giant: times every suborder for every suborder

205 00:21:38.040 00:21:42.050 Emily Giant: in looker the way because Looker does its own like aggregation thing.

206 00:21:42.190 00:21:47.745 Emily Giant: So even when it looks correct in Dbt, it will still

207 00:21:48.520 00:21:54.400 Emily Giant: fan out. But yeah, that’s what I’ve been using is inventory number id like just adding,

208 00:21:57.030 00:22:00.710 Emily Giant: well, you know what I just have that in

209 00:22:01.440 00:22:06.021 Emily Giant: the transaction level data. I’ve just carried that through from

210 00:22:07.360 00:22:14.970 Emily Giant: transaction line and inventory assignment. Those 2 models are like the 2 spaces where you can get.

211 00:22:15.390 00:22:20.695 Emily Giant: Let me. It’s when I’m talking about models. I’m like, why am I doing this? Let me show

212 00:22:22.340 00:22:30.390 Emily Giant: so essentially, you can pull the inventory number Id from inventory assignment once it’s actually on hand and has been assigned.

213 00:22:30.520 00:22:37.259 Emily Giant: and before that, like, when it’s in transit, you can pull it from inventory transaction line table, but

214 00:22:37.620 00:22:44.449 Emily Giant: every suborder does have one. So for the suborders, I’m able to pull it like

215 00:22:44.680 00:22:53.219 Emily Giant: in the same table. But it’s when I’m doing like the aggregate in Looker that it fans out.

216 00:22:53.420 00:22:59.270 Emily Giant: And I I just don’t know. I think it’s like the way I join it in the model or something. It’s not right.

217 00:23:00.020 00:23:05.089 Demilade Agboola: Alright, so are you trying to say that when you do it directly in Dbt. The numbers are right.

218 00:23:05.730 00:23:06.090 Emily Giant: Hmm.

219 00:23:06.440 00:23:08.940 Demilade Agboola: Look at you start having issues with the numbers.

220 00:23:10.540 00:23:13.120 Demilade Agboola: So my question is, why don’t we create

221 00:23:13.770 00:23:22.300 Demilade Agboola: a model that answers those aggregation directly in Gbt, so that all you have to do is, roll up or roll down in looker.

222 00:23:24.490 00:23:28.009 Emily Giant: Yeah, that that sounds great like

223 00:23:28.180 00:23:32.339 Emily Giant: that to me is cleaner. And it’s the same information without

224 00:23:32.470 00:23:35.820 Emily Giant: having, like multiple models representing the same thing.

225 00:23:36.450 00:23:46.640 Emily Giant: But yeah, like, what I’ve had to do in looker is like hide fields and like

226 00:23:47.480 00:23:54.589 Emily Giant: disconnect them from being joined to one another because of those fan out issues.

227 00:23:54.830 00:23:57.439 Emily Giant: So if that works, I just

228 00:23:57.990 00:24:00.260 Emily Giant: have not been able to pull it off

229 00:24:02.590 00:24:10.825 Emily Giant: with my, with my current knowledge of how looker like does things on its own accord, and I thought that it was

230 00:24:11.930 00:24:12.690 Demilade Agboola: Just to be clear.

231 00:24:12.690 00:24:15.290 Emily Giant: I thought it was how I find them. Yeah.

232 00:24:21.270 00:24:22.730 Demilade Agboola: For every inventory number.

233 00:24:23.280 00:24:24.330 Demilade Agboola: Right?

234 00:24:25.000 00:24:28.040 Demilade Agboola: We have a sub id associated with it.

235 00:24:30.810 00:24:32.549 Emily Giant: For every say it again. Sorry.

236 00:24:32.550 00:24:36.730 Demilade Agboola: Every inventory number. Id. We have server ids associated with it.

237 00:24:38.780 00:24:42.359 Emily Giant: Yes, technically, yes, if there are sales against it.

238 00:24:42.550 00:24:43.280 Demilade Agboola: Yes,

239 00:24:44.800 00:24:48.600 Demilade Agboola: So when they are sales against it, we have sub order ids associated with it.

240 00:24:49.320 00:24:50.880 Demilade Agboola: And

241 00:24:54.740 00:24:57.570 Demilade Agboola: do we always know the

242 00:25:00.020 00:25:11.519 Demilade Agboola: sub order Ids associated with it from the inventory number tables like when we, when we look at it from the lot, details, perspective, do we know the support Ids. Associated with that inventory number.

243 00:25:15.550 00:25:18.815 Emily Giant: We could. Yes, because that’s how.

244 00:25:20.970 00:25:25.069 Emily Giant: yes, you can. It’s from the transaction line table.

245 00:25:25.800 00:25:30.560 Emily Giant: That’s how we’re aggregating the sales or something.

246 00:25:31.150 00:25:36.389 Emily Giant: the suborders and the quantity from a table that has the suborder id available.

247 00:25:36.940 00:25:47.259 Demilade Agboola: Alright. So the reason why I’m asking that is because if we put the suborder id. So now, when we’re saying quantity sold, we’re doing a double granularity of the inventory number

248 00:25:48.520 00:25:52.770 Demilade Agboola: and the suborder id, and then the quantity sold at that level.

249 00:25:53.210 00:25:53.690 Emily Giant: Okay.

250 00:25:53.690 00:25:59.749 Demilade Agboola: Roll it up. For instance, when we need to just look at it from the inventory number.

251 00:26:00.090 00:26:00.450 Emily Giant: Hmm.

252 00:26:00.450 00:26:01.960 Demilade Agboola: Filter out

253 00:26:02.590 00:26:12.699 Demilade Agboola: by just inventory number by the suborder ids and the quantity sold for each of those suborder ids, so that when we try and join to the suborder Id tables. The.

254 00:26:12.700 00:26:13.220 Emily Giant: He’s in.

255 00:26:13.220 00:26:17.529 Demilade Agboola: But I think that matches and we can get a 1-to-one match.

256 00:26:17.810 00:26:22.619 Emily Giant: Yeah, yeah, this. So you’re saying

257 00:26:22.780 00:26:25.920 Emily Giant: that the suborder id is the one-to-one match. Correct?

258 00:26:25.920 00:26:26.540 Demilade Agboola: Yes.

259 00:26:26.810 00:26:28.080 Emily Giant: Yes, that is true.

260 00:26:28.260 00:26:37.609 Demilade Agboola: But because we don’t have a suborder id present in our lot. Level details join based on the inventory number. It kind of it would broadcast.

261 00:26:37.880 00:26:38.740 Emily Giant: Exactly.

262 00:26:38.740 00:26:48.250 Demilade Agboola: Across each of the suborder ids. So we need to be able to have our suborder Id presence in our tables that we’re going to join

263 00:26:48.640 00:26:52.109 Demilade Agboola: back to support that level details.

264 00:26:52.420 00:26:53.190 Demilade Agboola: Great.

265 00:26:53.190 00:27:13.320 Demilade Agboola: we need to be able to go, hey? These are the so when we’re calculating quantity sold, or whatever quantities. We also need to make accommodation for that level of details. So it will be a inventory number id time, not times when I mean times, I mean like X like there to get level. Granularity is inventory number and support id together.

266 00:27:13.320 00:27:13.810 Emily Giant: Come on!

267 00:27:13.810 00:27:16.200 Demilade Agboola: That’s the unique key on those tables.

268 00:27:16.590 00:27:17.350 Emily Giant: Yes.

269 00:27:17.770 00:27:26.790 Emily Giant: so it’s the suborder id, and then there has to be like a proxy for the adjustment. Id, because it’s really not just suborder. It’s every adjustment.

270 00:27:27.487 00:27:35.239 Emily Giant: So I had like a proxy in there as adjustment. Id, I think. But really it’s just like whatever

271 00:27:36.402 00:27:38.090 Emily Giant: the column is

272 00:27:38.240 00:27:55.720 Emily Giant: I need. I need to find it so that I don’t throw you on the wrong sent here. But there’s gonna be like a number that goes with a non sale subscription redelivery adjustment. That isn’t an order number because we want to be able to see those counts go in or out of a lot as well.

273 00:27:57.410 00:27:58.649 Emily Giant: Let me pull up.

274 00:27:59.380 00:28:02.639 Emily Giant: I need to switch branches here.

275 00:28:32.650 00:28:37.830 Emily Giant: gonna be in one of those reconciliation. Well, let’s go to the mart, and then I’ll work my way back. Mart.

276 00:28:42.730 00:28:45.729 Emily Giant: It’s called like document number, or something like that.

277 00:28:45.920 00:28:50.060 Emily Giant: or maybe adjustment id. But if you back out of adjustment, id.

278 00:28:50.860 00:28:58.720 Emily Giant: It’s like, if suborder Id isn’t present, pull this unique identifying number.

279 00:28:59.500 00:29:02.800 Demilade Agboola: But question private?

280 00:29:03.080 00:29:08.090 Demilade Agboola: Isn’t every adjustment Id. Also its own unique sub order? Id.

281 00:29:10.310 00:29:12.380 Emily Giant: Not, for, like

282 00:29:12.720 00:29:20.070 Emily Giant: inventory counts, or like the work you were doing yesterday, those adjustment types should also have an id, so that

283 00:29:20.280 00:29:24.404 Emily Giant: they can be associated with the inventory number.

284 00:29:25.200 00:29:29.610 Emily Giant: I guess it doesn’t really matter, because those can just be an aggregate. It doesn’t matter like

285 00:29:29.790 00:29:37.010 Emily Giant: that. One reconciliation was on the 3, rd and one was on the 6.th That’s more important sales.

286 00:29:37.010 00:29:43.030 Demilade Agboola: What what I’m saying if we have. And I’m just trying to understand how like it works like.

287 00:29:43.190 00:29:43.950 Emily Giant: Hmm.

288 00:29:43.950 00:29:46.380 Demilade Agboola: Data, wise or just like the entire process.

289 00:29:46.500 00:29:49.623 Emily Giant: We have an order with a suborder.

290 00:29:50.480 00:29:53.340 Demilade Agboola: Then there is an adjustment done on it.

291 00:29:53.710 00:29:54.550 Emily Giant: Hmm.

292 00:29:54.550 00:30:06.399 Demilade Agboola: That adjustment done? Does that also have? It will have an adjustment? Id sure. But that does that also have a suborder id that is unique from the other suborder ids in that like order.

293 00:30:09.100 00:30:12.057 Emily Giant: I’m not sure I understood. Sorry.

294 00:30:12.550 00:30:16.039 Demilade Agboola: Let’s say we have a support. Let’s say we have an order. Xyz.

295 00:30:16.040 00:30:16.640 Emily Giant: Okay.

296 00:30:16.990 00:30:21.120 Demilade Agboola: Then we have supporters, xyz. One xyz. 2 xyz. 3.

297 00:30:21.320 00:30:21.870 Emily Giant: Yeah.

298 00:30:22.020 00:30:28.920 Demilade Agboola: Right, then we have an adjustment done on that like order on Xyz order. Right

299 00:30:29.470 00:30:32.580 Demilade Agboola: now we have a new quote, unquote sub order.

300 00:30:33.000 00:30:38.769 Demilade Agboola: kind of thing being done on like our bunches of others. Say, we’re striking out something. We’re whatever.

301 00:30:38.980 00:30:39.380 Emily Giant: Hmm.

302 00:30:39.380 00:30:50.980 Demilade Agboola: That new adjustment become have its own unique. So what so border Id. Number say, xyz. 4, which is different from the xyz. One, xyz. 2, x. 1 so.

303 00:30:51.330 00:30:53.050 Demilade Agboola: Or or is it normal?

304 00:30:54.550 00:30:59.579 Emily Giant: So we’re saying, what physically are you saying that the suborder

305 00:31:00.010 00:31:05.619 Emily Giant: was placed, and that’s an adjustment. Id. Then the suborder was fulfilled, and that’s an adjustment. Id.

306 00:31:06.630 00:31:08.110 Demilade Agboola: Can I work?

307 00:31:08.473 00:31:10.289 Demilade Agboola: Can visualize trying to say.

308 00:31:16.480 00:31:17.570 Demilade Agboola: Can you see my screen.

309 00:31:18.770 00:31:22.570 Emily Giant: Nope, I see you.

310 00:31:23.190 00:31:27.430 Demilade Agboola: Interesting. It says I’m sharing my screen, so Zoom is lying.

311 00:31:27.780 00:31:29.370 Emily Giant: Lies.

312 00:31:29.560 00:31:32.030 Demilade Agboola: Okay, let me let me stop sharing and share again.

313 00:31:34.650 00:31:55.349 Emily Giant: I wore this shirt on vacation once in Italy, and I went to this really nice restaurant that was like a beach built into rocks, and every waiter was wearing the exact same shirt, and people kept walking up to me and trying to order drinks from me like the whole day. Every time I wear this shirt I just think of that day where I was just trying to be on vacation.

314 00:31:55.490 00:31:56.499 Emily Giant: And then, just.

315 00:31:59.850 00:32:01.649 Demilade Agboola: Can I get an apple? Spritz?

316 00:32:02.764 00:32:06.754 Emily Giant: Everyone’s ordering as well. It’s triggering.

317 00:32:07.874 00:32:12.739 Demilade Agboola: Yeah, I actually said apparel, Spritz, because I know the Italians love their aperol. Spritz.

318 00:32:12.740 00:32:17.790 Emily Giant: I love it. I feel like it tastes like cleaner, like window cleaner.

319 00:32:18.450 00:32:24.889 Demilade Agboola: Yeah, it’s it’s it’s quite I I don’t. I don’t understand the hype, but you know I let people do their thing.

320 00:32:25.260 00:32:25.800 Emily Giant: Yep.

321 00:32:25.800 00:32:29.150 Demilade Agboola: Exactly like after, like a meal, you know.

322 00:32:29.450 00:32:30.260 Emily Giant: Yeah.

323 00:32:30.900 00:32:32.879 Demilade Agboola: It’s supposed to be an.

324 00:32:33.030 00:32:34.310 Emily Giant: Digestive.

325 00:32:34.310 00:32:39.659 Demilade Agboola: Exactly digestive. I’m like, alright cool, cool. Can I just get regular cocktail? Thank you.

326 00:32:39.660 00:32:45.840 Emily Giant: Yeah, I do like that, though, which is like kind of the same same idea.

327 00:32:45.940 00:32:52.120 Emily Giant: It tastes like black licorice. Anything that tastes like black licorice I’m like, yes, please love that anise.

328 00:32:54.280 00:32:55.340 Emily Giant: Okay.

329 00:32:55.340 00:32:56.299 Demilade Agboola: What’s my screen?

330 00:32:56.820 00:33:03.669 Emily Giant: Yep, alright. So the order, yes. Subword. Yeah. Okay. So what you’re saying is there, is there an

331 00:33:04.070 00:33:07.520 Emily Giant: another unique identifier associated with.

332 00:33:08.690 00:33:13.550 Demilade Agboola: So, yeah, is that going to be like an XYZ, 4, basically.

333 00:33:13.670 00:33:15.199 Demilade Agboola: Or is this null.

334 00:33:17.130 00:33:18.789 Emily Giant: Well, it depends on what?

335 00:33:19.910 00:33:30.569 Emily Giant: What that adjustment. Id it? Oh, it’s null. It’s null. I know exactly what you’re saying now. Okay, so you’re saying like, this is the lot. These are the suborders on the lot. These are the adjustments on the lot.

336 00:33:30.570 00:33:31.220 Demilade Agboola: Yeah.

337 00:33:31.410 00:33:33.379 Emily Giant: There will be no sub order id.

338 00:33:34.110 00:33:36.240 Demilade Agboola: It will be 9, so it will be no.

339 00:33:36.460 00:33:37.250 Emily Giant: Yes.

340 00:33:37.490 00:33:42.380 Demilade Agboola: So effectively. Let’s say, unique key.

341 00:33:44.220 00:33:52.539 Emily Giant: Although I want to point out like it wouldn’t be the order. Id. I know what you’re saying that like if it’s the inventory number id in column a.

342 00:33:53.200 00:34:02.649 Emily Giant: Or, if you add another column and call it inventory number Id, because essentially we’re trying to some roll them up by the inventory number Id.

343 00:34:02.650 00:34:03.350 Demilade Agboola: Yeah.

344 00:34:03.590 00:34:05.401 Emily Giant: And those will all also be like

345 00:34:06.650 00:34:11.709 Emily Giant: Xyz, but like a different string of numbers that would not match the order. Id. Yeah.

346 00:34:17.800 00:34:20.759 Demilade Agboola: Alright. So we have an inventory number here, so Def.

347 00:34:21.280 00:34:21.600 Emily Giant: Yeah.

348 00:34:21.600 00:34:25.920 Demilade Agboola: Number. We have an order placed against it, which is Xyz.

349 00:34:27.050 00:34:30.320 Demilade Agboola: And then we have some border Ids, which are 1, 2, 3,

350 00:34:31.980 00:34:37.870 Demilade Agboola: and then all of a sudden, we have an adjustment done on this suborder.

351 00:34:39.199 00:34:42.269 Emily Giant: So there wouldn’t be an adjustment on the suborder.

352 00:34:42.399 00:34:44.439 Emily Giant: It would be on the lot

353 00:34:44.959 00:34:46.929 Emily Giant: or on the inventory number. Id.

354 00:34:47.590 00:34:57.840 Demilade Agboola: So it will be on the inventory number. Id. But do we? But how do we know what sub, what order? Slash sub order? It’s been adjusted on.

355 00:35:01.760 00:35:09.160 Demilade Agboola: I. I’m asking that because we can assume obviously that because we have an inventory number Id, we can have more orders on that.

356 00:35:09.580 00:35:10.430 Emily Giant: Yes.

357 00:35:10.430 00:35:15.379 Demilade Agboola: Yeah, so we can have, you know, g km, or something.

358 00:35:15.380 00:35:26.030 Emily Giant: Only one line per suborder id, and there’s only one line per other adjustment type

359 00:35:26.830 00:35:31.800 Emily Giant: id like. So the the uniqueness comes from

360 00:35:32.490 00:35:39.130 Emily Giant: suborder. Id if it’s a sale, and then if it’s an adjustment type, there is

361 00:35:41.475 00:35:48.560 Emily Giant: a different column that becomes populated. But sub order id will not be.

362 00:35:48.850 00:35:50.780 Emily Giant: And then there’s a record type.

363 00:35:52.580 00:35:56.619 Demilade Agboola: So what what I’m trying to say is this, so let’s say we have.

364 00:35:57.380 00:35:59.810 Demilade Agboola: This is delete this.

365 00:36:00.000 00:36:02.860 Demilade Agboola: So let’s say we have def right.

366 00:36:02.860 00:36:03.400 Emily Giant: Yeah.

367 00:36:03.400 00:36:10.730 Demilade Agboola: F. Has 2 order ids on it. Right? It has xyz and gkm right.

368 00:36:11.020 00:36:11.560 Emily Giant: Hmm.

369 00:36:11.560 00:36:17.010 Demilade Agboola: And then for those I think I could get rid of this as a necessary.

370 00:36:17.820 00:36:23.180 Demilade Agboola: And then for def, there are 2 suborder ids for like XYZ,

371 00:36:23.430 00:36:26.420 Demilade Agboola: which is xyz. One xyz. 2 xyz. 3,

372 00:36:26.710 00:36:31.919 Demilade Agboola: and then there’s gkm also on def. But it’s gkm one gkm, 2.

373 00:36:33.710 00:36:37.640 Demilade Agboola: Does that make? Is that fine? Does that flow work right now? Alright!

374 00:36:37.640 00:36:38.340 Emily Giant: Yep.

375 00:36:38.340 00:36:42.230 Demilade Agboola: Then, now we have an adjustment done on. Df.

376 00:36:42.750 00:36:47.159 Demilade Agboola: how do we know if it’s done on order this or order this.

377 00:36:50.120 00:36:59.150 Emily Giant: So the suborder id like is the adjustment. Id.

378 00:36:59.980 00:37:01.070 Emily Giant: If that

379 00:37:01.460 00:37:10.869 Emily Giant: tracks so it won’t be something separate from the sub order Id. That wouldn’t be on the same row. That will not happen.

380 00:37:12.190 00:37:16.390 Demilade Agboola: Alright. So now we will have an adjustment. Id

381 00:37:16.920 00:37:19.590 Demilade Agboola: in column like in row. 5.

382 00:37:21.010 00:37:26.709 Demilade Agboola: Xyz. 2, letting us know that it was done on Xyz. 2.

383 00:37:26.990 00:37:27.940 Emily Giant: So

384 00:37:29.180 00:37:42.320 Emily Giant: there will never be an adjustment. Id on a suborder id without the suborder id column being populated. I thought you meant a non sale adjustment. When you said, Will it be null?

385 00:37:42.520 00:37:45.530 Emily Giant: The suborder id column will only be null

386 00:37:45.730 00:37:56.180 Emily Giant: if it’s a non sale adjustment or non-delivery adjustment? So if there’s shrink, if there’s spoilage it will be null, otherwise it will be there

387 00:37:57.360 00:37:59.140 Emily Giant: in transaction line.

388 00:38:10.150 00:38:18.559 Demilade Agboola: So in that case, alright. So in this case it will just literally be an maybe ABC

389 00:38:19.450 00:38:21.430 Demilade Agboola: one. Right? This will be the end.

390 00:38:22.100 00:38:22.640 Emily Giant: Hmm.

391 00:38:23.380 00:38:28.580 Demilade Agboola: So let’s say, now we have another adjustment which is now a sale.

392 00:38:28.730 00:38:29.910 Demilade Agboola: Adjustments.

393 00:38:30.100 00:38:30.680 Emily Giant: Hmm.

394 00:38:35.587 00:38:40.780 Demilade Agboola: So now we have an adjustment which is ABC, 2, right?

395 00:38:41.190 00:38:47.160 Demilade Agboola: But now this is a still adjustment. This is associated with one of these, you know, sub orders. How do we know

396 00:38:47.680 00:38:53.229 Demilade Agboola: which it is, and how? What would the values here be, or what would that look like?

397 00:38:53.950 00:39:01.070 Emily Giant: So if the adjustment is a sale, there will be a suborder Id and.

398 00:39:01.510 00:39:05.079 Demilade Agboola: Would that be unique to this? So we’ll need to be, for instance, xyz. 4,

399 00:39:06.830 00:39:10.690 Demilade Agboola: or it be the same as the previous. This over. It is adjusting for.

400 00:39:12.920 00:39:15.150 Emily Giant: Is ABC. 2.

401 00:39:16.490 00:39:17.110 Demilade Agboola: So what’s.

402 00:39:17.260 00:39:19.660 Emily Giant: The new sale on the lot. Correct.

403 00:39:20.110 00:39:22.950 Demilade Agboola: No. ABC, 2 is a second adjustment that we’re doing

404 00:39:23.350 00:39:33.099 Demilade Agboola: so. This, ABC, one is a non sale adjustment. So here we would have no sub order, id, or order id. Associated with this adjustment, so it will be num.

405 00:39:34.120 00:39:34.940 Emily Giant: Yes.

406 00:39:34.940 00:39:40.000 Demilade Agboola: Right now I’m trying to populate a what a typical sale adjustment should look like.

407 00:39:40.390 00:39:43.169 Emily Giant: ABC. 2 will be in the suborder Id. Column.

408 00:39:43.900 00:39:47.589 Demilade Agboola: All right. So we’ll type ABC. 2 in the Server id column.

409 00:39:49.000 00:39:54.260 Demilade Agboola: Well, how would we know that ABC. 2 is associated with? Maybe this order.

410 00:39:55.010 00:40:06.430 Emily Giant: Oh, if if that’s the case, then the same, the same suborder id associated with the adjustment will always be consistent in the suborder id column. So if

411 00:40:06.620 00:40:18.769 Emily Giant: if something happens and they change the the product that was on the suborder originally, it will say, Xyz dash one, and then there’s a different adjustment.

412 00:40:19.120 00:40:27.129 Emily Giant: Id, and then the new product. But you can always like, in all of the intermediate models

413 00:40:27.540 00:40:38.060 Emily Giant: you look for. That the presence of the suborder Id, because it will always be there for any suborder, slash sale, redelivery adjustment.

414 00:40:38.830 00:40:46.570 Demilade Agboola: So what I’m what I’m trying to understand is so we would have

415 00:40:48.080 00:40:50.130 Demilade Agboola: XYZ. 1, 2, 3.

416 00:40:50.520 00:40:51.090 Emily Giant: Hmm.

417 00:40:54.630 00:40:58.900 Demilade Agboola: And then, when we have a new order, which is an adjustment on any of these, let’s just say.

418 00:40:59.640 00:41:02.559 Demilade Agboola: XYZ. 2 is what’s been adjusted for right?

419 00:41:04.240 00:41:07.120 Demilade Agboola: Will we have an adjustment? Id. That is unique.

420 00:41:09.890 00:41:12.160 Demilade Agboola: So we would have understandably, that is unique, right?

421 00:41:14.270 00:41:14.925 Emily Giant: No

422 00:41:15.580 00:41:16.270 Demilade Agboola: So far down.

423 00:41:16.270 00:41:21.599 Emily Giant: Yes, now the suborder id. So it’s really like.

424 00:41:21.720 00:41:47.290 Emily Giant: however, you want it. That’s the thing. With the polyatomic data. The suborder Id can be the unique identifier, because it will always be present when that record is being changed. But that is the record like that’s as granular as you need to go. That’s how like an incremental model will know that there’s been an update on that order is the suborder. Id. But are you looking for like just.

425 00:41:47.930 00:41:59.149 Demilade Agboola: So I’m trying to see what level of granularity we can create by saying, the unique key is the inventory number and support. Id, for instance, so that, like that would always be true.

426 00:42:01.040 00:42:13.820 Demilade Agboola: because once we combine the unique key of the inventory number and the support. Id, we know that when we’re joining back to whatever support id calculations we’ve we’ve we’ve done.

427 00:42:15.070 00:42:16.600 Demilade Agboola: Remain consistent.

428 00:42:17.350 00:42:18.970 Demilade Agboola: That’s when we roll up.

429 00:42:19.370 00:42:19.970 Emily Giant: Yeah.

430 00:42:20.190 00:42:21.790 Demilade Agboola: Like things will be fine.

431 00:42:22.570 00:42:26.280 Emily Giant: I would say the one thing to look for is the product. Id

432 00:42:26.570 00:42:32.329 Emily Giant: also, because that’s that combination, the inventory lot.

433 00:42:32.540 00:42:40.940 Emily Giant: the suborder Id and the product id are gonna be what is unique in that order.

434 00:42:41.110 00:42:52.920 Emily Giant: But the sub order Id is about as granular as it’s going to get on its own

435 00:42:54.300 00:42:55.769 Emily Giant: unless you’re because

436 00:42:58.280 00:43:06.600 Emily Giant: essentially the adjustment Id that you have in column D would represent a product, because the only difference of

437 00:43:06.920 00:43:11.340 Emily Giant: different units inside a suborder is the product that’s being adjusted.

438 00:43:12.170 00:43:16.460 Emily Giant: Does that make sense like a suborder?

439 00:43:18.520 00:43:21.189 Emily Giant: does it? I’m trying to think if it would help to like.

440 00:43:21.360 00:43:22.760 Emily Giant: Look at dash.

441 00:43:23.470 00:43:24.020 Demilade Agboola: Sure.

442 00:43:24.483 00:43:27.266 Emily Giant: Like walk through a sub order

443 00:43:27.840 00:43:47.369 Emily Giant: and then go through like the transaction line table where it all originates. This arm is like distractingly gross. I need to pull my sleeve down. Okay, let me share the screen real quick, because I know what you’re getting at. It’s just like fun like I know it so well like how these suborders work that it’s hard.

444 00:43:47.880 00:43:55.019 Emily Giant: It’s hard to break it down. Okay, let me pull a suborder in dash. Can you see my screen.

445 00:43:55.700 00:43:57.010 Demilade Agboola: Oh, yes, I can see your screen.

446 00:44:03.120 00:44:05.030 Emily Giant: Okay.

447 00:44:08.950 00:44:22.690 Emily Giant: so okay, perfect. Here’s a suborder with 2 products. So we’ve got Fl, Rlb, and the vase. And they’re all committed. So it’s not gonna look insane in the data.

448 00:44:23.970 00:44:27.460 Emily Giant: So we’ve got the order number.

449 00:44:27.710 00:44:31.320 Emily Giant: We’ve got sub order Id, and then in netsuite.

450 00:44:32.880 00:44:35.290 Emily Giant: Oh, gosh! Don’t make me do the thing.

451 00:44:37.600 00:44:42.510 Emily Giant: I spent half my day like authenticating myself and trying to prove I’m not a robot.

452 00:44:42.590 00:45:11.319 Emily Giant: all right. And then we’ve got the inventory detail here. This is what I was going to point out. Just to like bookmark is that hard goods and non florals are what we still need to test and make sure is correct in the inventory table. However, bookmark that, for now here’s the lot number which is always one to one with an inventory number Id, because we’re urban stems. We have both, you know, but they’re essentially the same thing a lot number and an inventory number. Id.

453 00:45:11.330 00:45:13.389 Emily Giant: It’s just how it’s being visualized.

454 00:45:13.730 00:45:25.680 Emily Giant: So this is like a good proxy of the inventory lot mart model, where it just aggregates everything.

455 00:45:26.330 00:45:34.910 Emily Giant: But it’s a mix of sales and other adjustment types.

456 00:45:35.220 00:45:37.720 Emily Giant: And if you look in

457 00:45:40.530 00:45:44.150 Emily Giant: here like lot activity lookup where it breaks it down.

458 00:45:44.340 00:45:48.879 Emily Giant: they’re not in the same column, but like they’ll be

459 00:45:49.390 00:45:53.900 Emily Giant: this one’s clearly edited to only be type sales order.

460 00:45:55.740 00:45:57.509 Emily Giant: I want to find one that like

461 00:45:57.860 00:46:07.999 Emily Giant: shows you the other adjustment ids. And then the numbers associated with those but for a sale.

462 00:46:10.960 00:46:17.639 Emily Giant: What you need is just to know that the product and the suborder id associated with that product

463 00:46:17.900 00:46:34.449 Emily Giant: is what is going to be the uniqueness of that row, and what our logic that we built during mother’s day will use to make any changes. But then there’s like this kind of id, that is a purchase order. Id.

464 00:46:34.918 00:46:42.370 Emily Giant: this a 2 0 2, 5, which is not a sales order id, and comes in in a different column, and we’ve got like this

465 00:46:42.480 00:47:03.650 Emily Giant: junk over here, which is going to be a transfer order. Id. And so that’s like the entire lot is being shipped to a facility they don’t matter like we don’t even have this item fulfillment stuff. I have it built out in the model, but no one uses that really they’re more interested in, like

466 00:47:04.290 00:47:07.590 Emily Giant: the quantity available on the lot.

467 00:47:07.790 00:47:10.819 Emily Giant: But this screen is like a good kind of

468 00:47:11.720 00:47:16.929 Emily Giant: proxy of the different things that happen on a lot that need to be rolled up and

469 00:47:17.430 00:47:28.119 Emily Giant: like the sales orders, it’s always like one unit, one unit. But then, when you get into like the receipts and inventory status changes it. It can be like bigger

470 00:47:28.230 00:47:30.930 Emily Giant: rolled up quantities, but

471 00:47:31.100 00:47:39.169 Emily Giant: sometimes there is not an external id, so you need to find, like a different field in the transaction line table that can sub in

472 00:47:40.940 00:47:44.399 Emily Giant: 4 suborder id, because it’s not a sale.

473 00:47:44.650 00:47:47.297 Emily Giant: Yeah, I know. Welcome.

474 00:47:48.210 00:47:53.610 Demilade Agboola: And so so this is non sale which we said so border id will be null

475 00:47:54.290 00:47:57.400 Demilade Agboola: right? Will there be an adjustment? Id though.

476 00:47:57.740 00:48:01.573 Emily Giant: Yes. So what I was having, where I got

477 00:48:03.710 00:48:08.590 Emily Giant: not blocked. I started. I think that there was a crisis. So I had to start working on something else.

478 00:48:08.710 00:48:09.750 Emily Giant: But

479 00:48:12.220 00:48:22.190 Emily Giant: I was trying to identify what a unique adjustment id for a non like customer delivered box looks like.

480 00:48:22.430 00:48:29.250 Emily Giant: And so and adjustments.

481 00:48:30.590 00:48:35.770 Emily Giant: I need our what you are working on, though

482 00:48:46.990 00:48:54.125 Emily Giant: how is it? 9 50? I am so sorry about yesterday. By the way, I I guess I didn’t accept my own invitation that I sent you.

483 00:48:54.540 00:48:59.390 Emily Giant: and I had these interviews, and I was taking a bunch of notes on these people to make sure I was like

484 00:48:59.580 00:49:04.550 Emily Giant: being fair and just. And then I looked up and you were like, well, I left. I was like, Oh, my gosh.

485 00:49:05.676 00:49:08.560 Emily Giant: okay. So it’s gonna be.

486 00:49:11.630 00:49:12.869 Demilade Agboola: What model are you looking for.

487 00:49:14.266 00:49:18.569 Emily Giant: Transaction line, because I feel like this is where all of the different

488 00:49:18.930 00:49:25.239 Emily Giant: this and transaction are, where, like the different adjustment, ids come through.

489 00:49:25.440 00:49:26.220 Demilade Agboola: Okay.

490 00:49:26.220 00:49:31.480 Emily Giant: There is this like unique key as an adjustment. Id, but that might as well be like a

491 00:49:32.330 00:49:39.510 Emily Giant: you could never use it to update a row. It’s truly like a random generated string.

492 00:49:39.840 00:49:40.290 Demilade Agboola: Okay.

493 00:49:41.130 00:49:48.244 Emily Giant: Transaction line id not usable inventory number. Id. But this is in this block. Right here is where

494 00:49:49.630 00:49:56.620 Emily Giant: I was looking into it to see if there was a unique key for other adjustment types.

495 00:49:56.820 00:49:59.950 Emily Giant: So it’s either in transaction line or transaction.

496 00:50:00.200 00:50:03.510 Emily Giant: I think it might be actually in the transaction table.

497 00:50:04.740 00:50:05.139 Demilade Agboola: So.

498 00:50:05.350 00:50:09.149 Emily Giant: And I can look and figure out which one is the unique thing.

499 00:50:09.630 00:50:13.710 Demilade Agboola: That’s fair. What I’m what I’m trying to find, though, is just either if

500 00:50:13.850 00:50:20.630 Demilade Agboola: one id or a combination of ids that would always, for every transaction

501 00:50:20.930 00:50:24.429 Demilade Agboola: be 1st off present, so there are no null values.

502 00:50:24.930 00:50:25.960 Demilade Agboola: Have 2.

503 00:50:26.393 00:50:31.390 Demilade Agboola: Will always be unique. So at least that way, we know that for every transaction that’s happened

504 00:50:31.540 00:50:36.340 Demilade Agboola: on an order or a sub order. We know that, like

505 00:50:37.750 00:50:46.939 Demilade Agboola: any quantity, sold, any quantity deducted anything that’s happening, we are always keeping track of it for every invention on by Id, and we can show that

506 00:50:47.160 00:50:54.239 Demilade Agboola: when we when there’s a sub border and we want to count that, or we want to not content, or we want content adjustments. We can easily do that.

507 00:50:55.110 00:50:57.020 Emily Giant: Yeah, so

508 00:50:57.700 00:51:12.829 Emily Giant: that I do not know. And that is literally like where I stopped working on adjustments was unique number. So I can continue to look into that because I do think it’s document Id or tran id in trans staging transactions.

509 00:51:14.290 00:51:20.119 Demilade Agboola: That’s fine. I’ll look. I’ll look at that today. I’m just trying to see if I can get like some context on that.

510 00:51:20.930 00:51:24.461 Emily Giant: Yeah, cause I used tran id

511 00:51:25.560 00:51:31.920 Emily Giant: to break out all of these different adjustment types, and I know that we don’t use them right now.

512 00:51:32.350 00:51:40.729 Emily Giant: but it was more for the like investigation of a unique id. But I kept finding

513 00:51:40.860 00:51:57.379 Emily Giant: that like when I would run it in my SQL. Runner trying to see if it was unique to a lot that they weren’t. There would be like 700 adjustment, different adjustments on different lots that all had the same transaction or document. This one

514 00:51:58.800 00:52:08.129 Emily Giant: think this is the unique key for non sale type adjustments.

515 00:52:11.120 00:52:15.470 Emily Giant: But it was all like in the past that they weren’t unique.

516 00:52:15.980 00:52:22.780 Emily Giant: So I will look into that because I don’t have a definitive answer. But I I

517 00:52:23.370 00:52:26.419 Emily Giant: believe what you’re looking for is when it’s not a suborder.

518 00:52:26.790 00:52:30.779 Emily Giant: What is the unique key that would be subbed in because suborder Id would be null.

519 00:52:31.430 00:52:32.430 Demilade Agboola: Exactly.

520 00:52:32.430 00:52:32.950 Emily Giant: Okay.

521 00:52:33.580 00:52:46.570 Demilade Agboola: Exactly. I just wanted to know, like what like, what column or combination of columns can we get that for every inventory id transaction that happens like invention number, and every invention number transaction that happens. We we know

522 00:52:46.950 00:52:49.240 Demilade Agboola: we have a defined key.

523 00:52:51.548 00:52:53.640 Demilade Agboola: We’re not, you know, counting dupes.

524 00:52:54.617 00:53:06.099 Demilade Agboola: Ask like the the thing you have. What tool do you? This is a very random trajectory, but this tool that you have up there that tells you what your next meeting is, and how many minutes you have left.

525 00:53:06.350 00:53:11.310 Demilade Agboola: It’s it’s fellow I’ve been trying to invite you, I mean, I.

526 00:53:11.310 00:53:12.518 Emily Giant: Can we try again.

527 00:53:13.274 00:53:15.999 Demilade Agboola: Am fellow, but I don’t know.

528 00:53:18.460 00:53:26.145 Emily Giant: It’s it’s great for that, only the rest of the time. It’s pretty annoying, but it is so nice, for, like the countdown,

529 00:53:27.710 00:53:50.049 Emily Giant: okay. So next time we meet, I want to do an audit of the incremental logic. Something happened at some point where models were not running, and that is the remaining suborders that are $0. It’s just like incremental logic things where they weren’t updated. I went back and like, did

530 00:53:50.230 00:53:59.387 Emily Giant: single full refreshes of every model where the revenue dollars were missing. From what we were talking about yesterday, and the ones that weren’t related to

531 00:53:59.860 00:54:05.422 Emily Giant: What we had figured out were actually correct. It was like redeliveries and

532 00:54:06.210 00:54:13.479 Emily Giant: I forget the other $0 sale reason. But I’m wondering if, like, when we added stuff during mother’s day. If

533 00:54:14.390 00:54:20.349 Emily Giant: on the Oms suborders model in particular, if it wasn’t

534 00:54:20.980 00:54:31.050 Emily Giant: the column or the field that was updated, I feel like I let me. I have 3 min, 4 min. Can I ask you a question? Real quick? That’s like kind of unrelated to all of this.

535 00:54:31.260 00:54:31.630 Demilade Agboola: Sure.

536 00:54:31.630 00:54:38.100 Emily Giant: I think you’ll be able to answer, okay, so let me change

537 00:54:40.570 00:54:56.619 Emily Giant: note added. So what I was trying to do yesterday, after hours, because I was like, this is not on our linear board, but I feel like I need to do this. Was oms sub orders. You’ve done a ton of work like breaking down all the staging models. So what I had

538 00:54:57.150 00:55:04.303 Emily Giant: done was try to pull out some of the logic in Oms suborders that was failing to update correctly.

539 00:55:05.530 00:55:10.899 Emily Giant: and I’m not sure that I trust this hevo.

540 00:55:11.660 00:55:16.140 Emily Giant: Aye, I’m going to pull up staging Oms

541 00:55:16.850 00:55:20.030 Emily Giant: orders. I’m also trying to like, swap out

542 00:55:20.320 00:55:27.840 Emily Giant: as much as I can for what you’ve updated nicely. So if I pull up this and oms supporters.

543 00:55:31.810 00:55:37.109 Emily Giant: and then I was doing an intermediate deal which I didn’t.

544 00:55:41.380 00:55:42.070 Emily Giant: Okay.

545 00:55:43.060 00:55:49.549 Emily Giant: So in Oms suborders, there’s all this shit at the top where I’m like trying to time gate stuff.

546 00:55:50.000 00:55:50.600 Demilade Agboola: You know.

547 00:55:50.600 00:55:58.259 Emily Giant: So when the migration happened, and then this used to be hevo ingested.

548 00:55:58.460 00:56:09.649 Emily Giant: and I changed it to modified at. But then I had this whole mental breakdown of like? Is this referencing the model that this is in, or is it referencing? Just the cte

549 00:56:09.790 00:56:16.059 Emily Giant: in the ginger like? I don’t actually understand what this is, and when I compiled it.

550 00:56:16.660 00:56:41.349 Emily Giant: my my reason for being like honing in on this piece is that this is incremental on the id. But this cte doesn’t have sub order id. It only has order. Id, and I’m just wondering if that has any kind of influence on like its success updating because it’s this one. And then the line line item, split cte that weren’t updating and everything else was.

551 00:56:42.320 00:56:48.112 Demilade Agboola: Okay. So 1st question, is there a modifier in that city like in that?

552 00:56:49.250 00:56:52.900 Emily Giant: Yes, in in the reference.

553 00:56:53.300 00:56:55.070 Emily Giant: So I changed it.

554 00:56:55.290 00:57:01.630 Demilade Agboola: Yeah, in the order city, though, like orders, is there a modified at column.

555 00:57:02.120 00:57:02.710 Emily Giant: No.

556 00:57:03.050 00:57:05.029 Demilade Agboola: Okay, so that’s that will be a problem.

557 00:57:05.260 00:57:13.490 Demilade Agboola: So let me just try and explain quickly. Explain what cause you have. 1 min we can explain what that city is doing like that, what incremental function is saying? Can you go down a little bit?

558 00:57:14.620 00:57:16.029 Demilade Agboola: So this

559 00:57:16.890 00:57:46.819 Demilade Agboola: selected incremental function? Yeah, so this that this refers to the current version of the model that exists in redshift. So what it’s saying is, hey, look for the maximum value of the modified column that exists right now in redshift tracks 14 days from it, and then look at this staging Oms model, and look for the modified column.

560 00:57:47.680 00:57:51.759 Emily Giant: Okay, so it is referencing, staging oms. It’s not referencing

561 00:57:52.730 00:58:05.019 Emily Giant: oms suborders the model that this lives in, because all of the resources I was looking at kept saying, model. And I was like, which model the one it’s referencing in the cte, or the one that it’s actually in.

562 00:58:05.190 00:58:14.379 Demilade Agboola: Yeah. So the modified. So the 1st modify that where modify that date is refer is referencing. The staging Oms orders. It’s saying.

563 00:58:14.380 00:58:15.740 Emily Giant: That does exist.

564 00:58:16.030 00:58:31.659 Demilade Agboola: That does exist. Now, if the final model, which is what exists, what it’s living in. If there is no modifier column, it doesn’t also have a reference point. So the second modifier is looking for the maximum that exists in that model.

565 00:58:33.240 00:58:36.229 Emily Giant: Bingo, Bingo. That’s why.

566 00:58:36.810 00:58:37.810 Emily Giant: Okay.

567 00:58:37.810 00:59:03.119 Demilade Agboola: So by the and also you don’t have to use the same column names it could literally just be. There’s a column like it might be modified that it might be updated. That so it might be. The modifier is greater than the last update. Like, as long as you know, a column date that works, and it’s always going to be updated. That would be the column from for this. And then, as long as you have a date column that, you know is coming from your table, that you’re trying to increment that.

568 00:59:03.120 00:59:03.460 Emily Giant: Okay.

569 00:59:03.510 00:59:10.180 Demilade Agboola: Name of the the column that you’re going to use to equate to greater than equals to 14 days. Blah blah.

570 00:59:10.360 00:59:21.460 Emily Giant: Okay, okay, that is so helpful. So just very quickly. I know we both need to go. I am moving all of this shit into its own like intermediate model. Because it is

571 00:59:21.600 00:59:33.940 Emily Giant: it is has no place in that bigger model. There’s nothing there, anyway. Not. I’m just actually adding it to this, like all of the does that make sense to?

572 00:59:34.050 00:59:34.930 Emily Giant: Okay.

573 00:59:34.930 00:59:42.780 Demilade Agboola: I’m actually gonna break down oms support as even a bit smaller. Just so we can have an intermediate models where, like some of that logic is happening.

574 00:59:43.730 01:00:00.560 Demilade Agboola: Because there’s so much going on there. I was going to break it down a bit further, which is part of one of my tasks of like transactions and orders. I plan to do that. But yeah, I’ll do that this week. I just wanted to get the inventory out of the way, cause that’s higher priority, and then I’ll do that this week.

575 01:00:00.980 01:00:03.121 Emily Giant: Okay, so part of this.

576 01:00:03.940 01:00:29.379 Emily Giant: I. I’m happy to work on the that 1st block, the staging orders just adding the coalesces to the staging model without like removing anything that you already have, because the what I’m running into is the internal issue with refreshes. So it is kind of like compiling those 2 tasks. Anyway, I’ll tag you in, though as a reviewer I gotta hop sorry alright. Talk to you soon, bye.

577 01:00:31.300 01:00:32.059 Emily Giant: I don’t know.