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