cube-js / 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 29 comments 0 reactions 1 assignee Claimed by @igorlukanin View on GitHub
help wanted
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

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](https://github.com/cube-js/cube/assets/105570808/8c21b1f3-69fc-48e6-8899-e9c9b2bd8045)

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.