{"record":{"id":"dab74a4082448f48","repo":"SigNoz/signoz","slug":"no-operations-table-supplied","errorCode":null,"errorMessage":"no operations table supplied","messagePattern":"no operations table supplied","errorType":"exception","errorClass":"error","httpStatus":null,"severity":"error","filePath":"pkg/query-service/app/clickhouseReader/reader.go","lineNumber":118,"sourceCode":"\tsignozTSTableNameV41Week      = \"distributed_time_series_v4_1week\"\n\n\tsignozTSTableNameV4Reduced = \"distributed_time_series_v4_reduced\"\n\n\tsignozTableAttributesMetadata      = \"distributed_attributes_metadata\"\n\tsignozLocalTableAttributesMetadata = \"attributes_metadata\"\n\n\tsignozUpdatedMetricsMetadataLocalTable = \"updated_metadata\"\n\tsignozUpdatedMetricsMetadataTable      = \"distributed_updated_metadata\"\n\tminTimespanForProgressiveSearch        = time.Hour\n\tminTimespanForProgressiveSearchMargin  = time.Minute\n\tmaxProgressiveSteps                    = 4\n\tcharset                                = \"abcdefghijklmnopqrstuvwxyz\" +\n\t\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\n\tNANOSECOND = 1000000000\n)\n\nvar (\n\tErrNoOperationsTable            = errors.New(\"no operations table supplied\")\n\tErrNoIndexTable                 = errors.New(\"no index table supplied\")\n\tErrStartTimeRequired            = errors.New(\"start time is required for search queries\")\n\tseededRand           *rand.Rand = rand.New(\n\t\trand.NewSource(time.Now().UnixNano()))\n)\n\n// SpanWriter for reading spans from ClickHouse\ntype ClickHouseReader struct {\n\tdb                      clickhouse.Conn\n\tprometheus              prometheus.Prometheus\n\tsqlDB                   sqlstore.SQLStore\n\tTraceDB                 string\n\toperationsTable         string\n\tdurationTable           string\n\tindexTable              string\n\terrorTable              string\n\tusageExplorerTable      string\n\tSpansTable              string","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/clickhouseReader/reader.go#L100-L136","documentation":"ErrNoOperationsTable is a sentinel error from the ClickHouse reader: the query service was constructed without an operations table name, so operation-based queries cannot run.","triggerScenarios":"Instantating/calling ClickHouseReader methods that need the operations table when the operationsTable config/arg is empty (e.g. GetOperations-style queries with no table configured).","commonSituations":"Missing operations table setting in query-service config/env; a ClickHouse schema version that doesn't create the operations table; fresh installs skipping the migration step.","solutions":["Set the operations table name in the query-service ClickHouse reader configuration","Verify the ClickHouse schema migration that creates the operations table has run","Pass a non-empty operationsTable argument when constructing the reader"],"exampleFix":"// before\nreader := clickhouseReader.NewClickHouseReader(conn, \"\", indexTable)\n// after\nreader := clickhouseReader.NewClickHouseReader(conn, \"signouts_operations\", indexTable)","handlingStrategy":"validation","validationCode":"if operationsTable == \"\" {\n    log.Fatal(\"operations table must be configured (e.g. via env/config)\")\n}\nreader := NewClickHouseReader(conn, operationsTable, indexTable)","typeGuard":null,"tryCatchPattern":"if err := reader.SomeOperationQuery(ctx, params); errors.Is(err, clickhouseReader.ErrNoOperationsTable) {\n    // fix config and restart rather than retrying\n}","preventionTips":["Add a config sanity check at service boot","Run ClickHouse schema migrations before deploying query-service"],"tags":["config","clickhouse","query-service","missing-table"],"backgroundTag":"missing-env-var","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}