cube-js/cube

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

Offen

#6.960 geöffnet am 28.07.2023

 (29 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (1.965 Forks)batch import
help wanted

Repository-Metriken

Stars
 (19.563 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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.

Contributor Guide