
Totals fix with unlimited downloads
Bunch of hidden work to improve downloads with totals.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
So that's the first one. Um second one is uh very simple um to to show what's going on but um very complicated underneath the hood. This is a period over period calculation with an or in the period calculation. So this is in the year 2016 2026 or 2025 and it's got to compare to the previous year. What would happen is in the past if you turned on column totals our our computation would actually filter out the column totals.
we would calculate them in an earlier pass in the SQL query and then filter them out so that you wouldn't see them. This is mostly important because we need those column totals for um doing unlimited downloads. Now this is u this isn't a like a direct pivoted query but because of this period over period computation in order to do an unlimited pivoted download we needed the totals and of course if we ripped off the totals it would fail in a fantastic way.
So, this was just pummeling in some extra semantic bits in order to get those um uh pivoted unlimited downloads to work, but also if you turned on column totals, now you get to see them. Um the next one is a very similar sort of strange problem. Um and actually this one's sort of even more strange because it doesn't really make sense to do it this way.
Um but it's a thing you can you could request in the UI and what basically would happen is we wouldn't tell you. This is a pivoted query with no grouping columns. Um, and previous what would happen if you turned on column totals, it would do nothing. Um, and it would wouldn't show you uh anything. It would just be like the query is what the query is.
Um, and under the hood, like somewhere deep in our code, we would say like this doesn't make sense. We're just not going to do it for you. Um, but in order to make the UI look a little bit more sane, I do need to I have another PR that goes and adds the totals label to this in the same way that it does for other totals queries.
But here, you can request column totals for this. And then in addition, you can then do an unlimited download of this query. Similarly, like it doesn't really make sense to do an unlimited download for this query because you only have, if you look at this, there are two rows and there will kind of only ever be two rows um or one if you're not put throwing in uh totals like I have here.
So, a little bit strange, but it's just like an edge case that wasn't working with unlimited pivoted downloads. Um, and then this one here is definitely still in development, but is something that um has bugged me for a while that I figured I'd take a quick stab at. um in order to run a certain what would happen is if you tried to run a download on something that failed, you kind of get into this weird state where um it's it's a little hard to to show um because this is hopefully a functioning state.
But what end up happening is that when you pop up in the download window, you do something that required an uh you know that that that could possibly fail. So this query is going to fail its unlimited download because it requires a calculation that we can't process uh in memory like we need to push the the calculation down to the database in order to do the unlimited download.
Um this particular calculation is nonsensical and tries to do a date transformation or a formatting on numbers that just doesn't make sense and we don't push down. We don't know how to push down. Um so the unlimited query kind of will fail there. What would end up happening is that it would attempt the unlimited download. it would pop open a little error message here in the corner and then repop this unlimited thing and you kind of have this your error message hiding behind the scenes.
So what ends up happening now is instead hopefully um is that when it fails it pops open a much more reasonable error message. It actually sticks around for a little bit longer. It only flashed for an instance before you can actually see why your your download failed and then you can click it there. And then similarly, if you want to have a successful download, um it will, you know, do the normal thing and eventually pop in a download.
And you can see I have lots of downloads. I think that's it.