Skip to content

ClickHouse query errors due to missing tables #3014

Description

@dkmorgan

I would like some help to identify the cause of ClickHouse query errors I am facing with a deployment based on the example docker-compose.yml file.

Versions used:

  • clickhouse/clickhouse-server:26.3.20.7-alpine
  • clickhouse/clickstack-otel-collector:2.35.0
  • mongo:8.0.29-noble
  • hyperdx/hyperdx:2.35.0

The HyperDX stack runs with no observable issues.
I can obtain the API key from UI and use it for my web application stack to export logs, metrics, and traces.
The OTel signals are all ingested by the HyperDX stack without any issues.

However, I keep getting the following query error in the ClickHouse logs:

<Error> executeQuery: Code: 60. DB::Exception: Unknown table expression identifier 'default.otel_logs_key_rollup_15m' in scope SELECT Key FROM default.otel_logs_key_rollup_15m WHERE (ColumnIdentifier = 'ResourceAttributes') AND (Timestamp >= toStartOfFifteenMinutes(fromUnixTimestamp64Milli(_CAST(1787831100000, 'Int64')))) AND (Timestamp <= toStartOfFifteenMinutes(fromUnixTimestamp64Milli(_CAST(1787832900000, 'Int64')))) GROUP BY Key ORDER BY sum(count) DESC LIMIT _CAST(1000, 'Int32'). (UNKNOWN_TABLE) (version 26.3.20.7 (official build)) (from 192.168.0.4:45238) (in query: SELECT Key FROM default.otel_logs_key_rollup_15m WHERE (ColumnIdentifier = 'ResourceAttributes') AND (Timestamp >= toStartOfFifteenMinutes(fromUnixTimestamp64Milli(_CAST(1787831100000, 'Int64')))) AND (Timestamp <= toStartOfFifteenMinutes(fromUnixTimestamp64Milli(_CAST(1787832900000, 'Int64')))) GROUP BY Key ORDER BY sum(count) DESC LIMIT _CAST(1000, 'Int32') FORMAT JSON), Stack trace (when copying this message, always include the lines below):

The otel_logs_key_rollup_15m table does not exist in the ClickHouse database. The same applies to the otel_traces_key_rollup_15m table.
I have tried setting HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA to "false" but that did not make any difference.

I did notice that the DEFAULT_SOURCES definition in the docker-compose.yml file of ClickStack doesn't contain the metadataMaterializedViews entries referencing the tables mentioned above.

Are the otel_logs_key_rollup_15m and otel_traces_key_rollup_15m tables supposed to be created manually?
Or is the current DEFAULT_SOURCES definition in the example docker compose file not compatible with the database schema that is created?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions