{"record":{"id":"4bd8f1f4cfa8614a","repo":"thanos-io/thanos","slug":"column-s-not-found","errorCode":null,"errorMessage":"column %s not found","messagePattern":"column (.+?) not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/tools_bucket.go","lineNumber":1012,"sourceCode":"\t\t\ttimeRange.String(),\n\t\t\tuntilDown,\n\t\t\tp.Sprintf(\"%d\", blockMeta.Stats.NumSeries),\n\t\t\tp.Sprintf(\"%d\", blockMeta.Stats.NumSamples),\n\t\t\tp.Sprintf(\"%d\", blockMeta.Stats.NumChunks),\n\t\t\tp.Sprintf(\"%d\", blockMeta.Compaction.Level),\n\t\t\tp.Sprintf(\"%t\", blockMeta.Compaction.Failed),\n\t\t\tstrings.Join(labels, \",\"),\n\t\t\ttime.Duration(blockMeta.Thanos.Downsample.Resolution*int64(time.Millisecond)).String(),\n\t\t\tstring(blockMeta.Thanos.Source))\n\n\t\tlines = append(lines, line)\n\t}\n\n\tvar sortByColNum []int\n\tfor _, col := range sortBy {\n\t\tindex := getIndex(header, col)\n\t\tif index == -1 {\n\t\t\treturn errors.Errorf(\"column %s not found\", col)\n\t\t}\n\t\tsortByColNum = append(sortByColNum, index)\n\t}\n\n\tt := Table{Header: header, Lines: lines, SortIndices: sortByColNum}\n\tsort.Sort(t)\n\terr := printer(os.Stdout, t)\n\tif err != nil {\n\t\treturn errors.Errorf(\"unable to write output.\")\n\t}\n\treturn nil\n}\n\nfunc getKeysAlphabetically(labels map[string]string) []string {\n\tvar keys []string\n\tfor k := range labels {\n\t\tkeys = append(keys, k)\n\t}","sourceCodeStart":994,"sourceCodeEnd":1030,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/tools_bucket.go#L994-L1030","documentation":"A lookup guard in the bucket bucket-inspect/verify table writer: a column name passed via the sort-by option is not present in the table header produced for block metadata. The sort key must name one of the known columns (ULID, until-down, series, samples, etc.); the offending column name is the input at fault.","triggerScenarios":"Thrown at cmd/thanos/tools_bucket.go:1012 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use exact column names shown in the table header","Check --sort-by for typos","Remove the unknown column from --sort-by"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}