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.64k stars 111 forks source link

Clickhouse: Rill should work in a different and possibly unique database when building models #5469

Open k-anshul opened 1 month ago

k-anshul commented 1 month ago

Add an option database in connector config that allows setting the database to be used for creating models.

k-anshul commented 1 month ago

This will also allow us to fix this issue for self hosted replicated database deployments : https://github.com/rilldata/rill/issues/5420 We can check if the database is a replicated database and if yes we can create tables in replicated mode by default. This avoid taking cluster name as input from the user.

begelundmuller commented 1 month ago

What if a database is specified in the DSN? Also, are you proposing this defaults to something like rill or should use the default database if not specified?

If it doesn't use the default database by default, then models or dashboards that reference pre-existing tables won't work without specifying the default database explicitly, right? That's probably fine, but something we should document – it would also be a breaking change, how should we handle that for current ClickHouse projects?