I think the easiest way for you will be to disable schema fetching in the server code as it’s easier to tinker with as you can change it “in place”.
There are two places where you can disable schema loading:
The API handler: the code is very obvious. Just change it to return an empty array ([]). If you have multiple data sources in your instance and you want to disable it only for one of them, you can add some logic there to return empty array only for specific requests.
In the query runner: each query runner has a get_schema or _get_tables method (depends on which class it inherits). You can change it to return an empty array. The benefit of doing this at the query runner level is that you won’t needlessly query your database for the schema.
If you don’t mind Redash querying for the schema in the background, then go for option #1.
If you go for option #2, then make sure to make the change in the correct query runner and delete the Redis cache key for the schema (data_source:schema:<data source id>).
We’re planning to improve the handling of large schemas by avoiding loading all the schema in the frontend, but this will be only in a release or two from now.
I cannot load schema of 3979 tables from BigQuery.
It stopped loading without an error, everytime in 5 minutes from starting.
As another connection with 1000 tables works well, loading in 3 minites,
I dought some timeout setting is within 300 sec, but couldn’t find in document,
I’ve already set env following
What do you mean by “token”, and how can I check the amount of tokens?
Yes, we have tables with near 100 columns.
These tables also have _table_suffix of date, at the same time,
and 1000 tables are there with the same schema.
example 1)
Google Analytics 4’ exported table
analytics_*****.events_20220609
analytics_*****.events_20220608
…
example 2)
Google App Engine’s lof
appengine_log.appengine_googleapis_com_request_log_20220609
appengine_log.appengine_googleapis_com_request_log_20220608
…
If I can skip loading these suffix tables,
under 500 tables are in these schemas.
A table name is a token. A column name is a token. The total number of tokens is the sum of all the table names + the sum of all the column names. If you have 3k tables with 100 columns each that totals 303k tokens. The documentation advises that if your database has more than 5k tokens, you should disable schema loading entirely from the data source settings screen.
go to BQ console
a. add “BigQuery Data Viewer” to Dataset Permissions if the schema doesn’t contain “suffix-table”
b. add “BigQuery Data Viewer” to Table Permissions if the schema contain “suffix-table”
go “new query” and reflesh schema, then you see what you want
In case b, you can query table but schema loader doesn’t waste tokens for these tables and columns
1 Like
Login or sign up disabled while the site is in read only mode