demo D303
Two feeds that share no key, ranked as one list
Two incident feeds with different identifiers and different field names, stacked into a single ranking that says which feed each row came from
source: { mode: 'derived', from: [{ grid, label, map }] }
Two incident feeds that share no identifier and do not agree on what their fields are called, ranked as a single worst-first list. Each row says which feed it came from, and narrowing one feed changes only its own share of the ranking.
Combining two datasets that have no key in common
Some questions cannot be joined. “The worst incidents across both regions” has no shared identifier to match on when each region numbers its own tickets from one, and the two systems call the same idea severity and rating. Lattice Grid answers it by letting a derived grid read several grids instead of one: every source is read, each narrowed by its own filter, concatenated in the order you declared them, and only then does the sort, the limit and the rest of the pipeline run once over the combined set. The result is one derivation rather than a hand-merged array you have to keep in step by hand.
Each source can reshape itself on the way in, which is what makes two disagreeing shapes comparable: a source whose fields are named differently projects them into the common shape before it joins the rest. Every combined row carries the tag of the source it came from as an ordinary field, so the ranking can be read, filtered and grouped by origin. Fields are unioned rather than merged, so a field only one source has is simply absent on the others’ rows rather than fabricated, and nothing is de-duplicated: two sources reporting the same fact appear as two rows, because deciding they are the same fact is a judgement only you can make.
The sources stay live. Filter one of them and only its contribution to the combined list narrows, while the other keeps every row it had. That is the behaviour to watch on this page: the ranking rebalances towards whichever feed is still whole.
How do you show rows from two different data grids in one grid?
Give a derived source an array of grids rather than a single grid, each entry naming its grid, a label, and optionally a mapping function that renames its fields into a common shape. Lattice Grid stacks the row sets, tags every row with its source label, and runs the sort, filter, grouping and limit once over the result.
When should you use this instead of a join?
Use a join when the rows should be matched to each other on a shared key, so that one row gains the other’s fields. Stack the sources instead when the rows should sit beside each other as separate records, which is what “the worst across both” needs.