Offer dimensions in the segment filter, not just dates and filter columns
The load filter dropdown listed role 'date' and role 'filter' only, so a segment could not be cut on sseas without recoding it -- and role is a single value, so that trade would have taken it off the pivot to put it in a dropdown. Nothing downstream required the restriction: the server drops filter_clause into the load's WHERE against the source table without consulting col_meta, and this form takes values as free text rather than through the key-only values endpoint. So the fix is to stop filtering them out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
122632cf24
commit
2bba3e9322
@ -98,7 +98,11 @@ export default function Baseline({ sources = [], sourceId, versions = [], versio
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!sourceId) return
|
if (!sourceId) return
|
||||||
fetch(`/api/sources/${sourceId}/cols`).then(r => r.json()).then(cols => {
|
fetch(`/api/sources/${sourceId}/cols`).then(r => r.json()).then(cols => {
|
||||||
const fc = cols.filter(c => c.role === 'date' || c.role === 'filter')
|
// What a load is filtered by and what the pivot groups by are separate
|
||||||
|
// concerns: a dimension is exactly the sort of thing a segment is cut on
|
||||||
|
// (sseas, channel_new), and forcing it to role 'filter' to get it here
|
||||||
|
// would cost it its place on the pivot. Only measures are excluded.
|
||||||
|
const fc = cols.filter(c => ['date', 'filter', 'dimension'].includes(c.role))
|
||||||
setFilterCols(fc)
|
setFilterCols(fc)
|
||||||
setFilters(fc.length > 0 ? [emptyGroup(fc)] : [])
|
setFilters(fc.length > 0 ? [emptyGroup(fc)] : [])
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user