cube-js/cube

How can i connect multiple SQL databases on cube -- ability to work with multiple data source during data model generation

Open

#6,960 opened on 2023年7月28日

GitHub で見る
 (29 comments) (0 reactions) (1 assignee)Rust (1,965 forks)batch import
help wanted

Repository metrics

Stars
 (19,563 stars)
PR merge metrics
 (平均マージ 5d 16h) (30d で 138 merged PRs)

説明

i've updated sql credentials for the cube in the .env file. It successfully accesses the default datasource, but it completely disregards the 2nd datasource.

.env file:

CUBEJS_DB_HOST=matomo.HIDDEN CUBEJS_DB_PORT=3306 CUBEJS_DB_NAME=matomo CUBEJS_DB_USER=tesdb CUBEJS_DB_PASS=HIDDEN CUBEJS_DB_TYPE=mysql CUBEJS_DS_DATASOURCE1_DB_HOST=matomo.HIDDEN CUBEJS_DS_DATASOURCE1_DB_PORT=3306 CUBEJS_DS_DATASOURCE1_DB_NAME=usdata CUBEJS_DS_DATASOURCE1_DB_USER=testdb2 CUBEJS_DS_DATASOURCE1_DB_PASS=HIDDEN CUBEJS_DS_DATASOURCE1_DB_TYPE=mysql CUBEJS_API_SECRET=HIDDEN CUBEJS_EXTERNAL_DEFAULT=true CUBEJS_SCHEDULED_REFRESH_DEFAULT=true CUBEJS_DEV_MODE=true CUBEJS_SCHEMA_PATH=model

It will only show "matomo" db image

if I set the default datasource with datasource1 credentials, only the "usdata" database will be displayed. The Cube application entirely disregards datasource1.

コントリビューターガイド