rilldata / rill

Rill is a tool for effortlessly transforming data sets into powerful, opinionated dashboards using SQL. BI-as-code.
https://www.rilldata.com
Apache License 2.0
1.61k stars 111 forks source link

ClickHouse: Dashboards based on the `readonly` ClickHouse Playground don't work #5279

Open ericpgreen2 opened 1 month ago

ericpgreen2 commented 1 month ago

Here's my ClickHouse connector YAML:

# clickhouse_playground.yaml
type: connector

driver: clickhouse
host: "play.clickhouse.com"
port: 443
username: play
ssl: true
settings_override: readonly=1 # Am I using this as intended?

I've created the following dashboard:

# hackernews_dashboard.yaml
type: metrics_view

title: Hackernews
connector: clickhouse_playground
table: hackernews

timeseries: time

dimensions:
  - label: Type
    column: type
  - label: By
    column: by
  - label: Text
    column: text
  - label: Url
    column: url
  - label: Title
    column: title

measures:
  - name: total_records
    label: Total records
    expression: COUNT(*)
    format_preset: humanize
    valid_percent_of_total: true

The dashboard is blank with the following error: "clickhouse [execute]:: 500 code: Code: 164. DB::Exception: Cannot modify 'max_execution_time' setting in readonly mode. (READONLY) (version 24.6.1.2672 (official build))\n"

image
k-anshul commented 1 month ago

I think this was introduced in this PR : https://github.com/rilldata/rill/pull/5103 The max_execution_time settings is added directly by underlying driver. The issue is that clickhouse playground is very restrictive and the readonly=1 was sort of a workaround. Now we may be able to circumnavigate around this issue too but longer term but longer term we need to think if we should really continue to support clickhouse playground or not. cc : @nishantmonu51

ericpgreen2 commented 1 month ago

IMO it's important to support ClickHouse Playground for demos. At least for dashboards. It's understandable if modeling (i.e. writebacks) is not supported.