cube-js/cube

CUBEJS_DB_SCHEMA doesn't work for snowflake connector

Open

#7.285 geöffnet am 20. Okt. 2023

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.965 Forks)batch import
help wanted

Repository-Metriken

Stars
 (19.563 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 16h) (138 gemergte PRs in 30 T)

Beschreibung

Describe the bug I am trying to load a schema with many millions of columns and it is taking long and failing. I tried using CUBEJS_DB_SCHEMA to filter the results, which I believe would work. Documented here: https://cube.dev/docs/reference/configuration/environment-variables#cubejs_db_schema

But this setting does not influence the information schema query. I can see that the info schema query is hardcoded and the env var is never templated in: https://github.com/cube-js/cube/blob/master/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts#L849

To Reproduce Steps to reproduce the behavior:

  1. Set the CUBEJS_DB_SCHEMA env var
  2. Connect via snowflake
  3. Observe that it runs the informationSchema query without filter

Expected behavior The informationSchema query should include the schema filter in the where clause.

Screenshots N/A

Minimally reproducible Cube Schema N/A

Version: 0.34.6

Additional context N/A

Contributor Guide