SQL databases Do not load a DB with many tables


#1

Hello, I have a BD with more than 2000 tables and can not synchronize with Metabase
Is there any way to choose some tables ?? I just need to use about 10
Thank you

11-02 17:22:50 e[1mERROR metabase.middlewaree[0m :: GET /api/automagic-dashboards/database/3/candidates 500 (18 s) (6 DB calls).
{:message
“Error de Sintaxis en sentencia SQL “SELECT ““TABLE_ID””, COUNT() AS ““COUNT”” FROM ““METABASE_FIELD”” WHERE (("“TABLE_ID”" IN NULL[]) AND ““ACTIVE”” = TRUE AND (”“SPECIAL_TYPE”” IN (?, ?))) GROUP BY ““TABLE_ID”” “; se esperaba “(”\nSyntax error in SQL statement “SELECT ““TABLE_ID””, COUNT() AS ““COUNT”” FROM ““METABASE_FIELD”” WHERE (("“TABLE_ID”" IN NULL[]) AND ““ACTIVE”” = TRUE AND (”“SPECIAL_TYPE”” IN (?, ?))) GROUP BY ““TABLE_ID”” “; expected “(”; SQL statement:\nSELECT “TABLE_ID”, count() AS “COUNT” FROM “METABASE_FIELD” WHERE ((“TABLE_ID” in NULL) AND “ACTIVE” = TRUE AND (“SPECIAL_TYPE” in (?, ?))) GROUP BY “TABLE_ID” [42001-197]",
:type org.h2.jdbc.JdbcSQLException,
:stacktrace
[“automagic_dashboards.core$enhance_table_stats.invokeStatic(core.clj:1218)”
“automagic_dashboards.core$enhance_table_stats.invoke(core.clj:1196)”
“automagic_dashboards.core$candidate_tables.invokeStatic(core.clj:1257)”
“automagic_dashboards.core$candidate_tables.invoke(core.clj:1237)”
“automagic_dashboards.core$candidate_tables.invokeStatic(core.clj:1247)”
“automagic_dashboards.core$candidate_tables.invoke(core.clj:1237)”
“api.automagic_dashboards$fn__46044.invokeStatic(automagic_dashboards.clj:58)”
“api.automagic_dashboards$fn__46044.invoke(automagic_dashboards.clj:55)”
“middleware$enforce_authentication$fn__55386.invoke(middleware.clj:107)”
“api.routes$fn__55528.invokeStatic(routes.clj:60)”
“api.routes$fn__55528.invoke(routes.clj:60)”
“routes$fn__55617$fn__55618.doInvoke(routes.clj:108)”
“routes$fn__55617.invokeStatic(routes.clj:103)”
“routes$fn__55617.invoke(routes.clj:103)”
“middleware$catch_api_exceptions$fn__55519.invoke(middleware.clj:422)”
“middleware$log_api_call$fn__55497$fn__55499.invoke(middleware.clj:350)”
“middleware$log_api_call$fn__55497.invoke(middleware.clj:349)”
“middleware$add_security_headers$fn__55439.invoke(middleware.clj:239)”
“core$wrap_streamed_json_response$fn__60814.invoke(core.clj:67)”
“middleware$bind_current_user$fn__55391.invoke(middleware.clj:131)”
“middleware$maybe_set_site_url$fn__55449.invoke(middleware.clj:276)”
“middleware$add_content_type$fn__55442.invoke(middleware.clj:248)”],
:sql-exception-chain
[“JdbcSQLException:”
"Message: Error de Sintaxis en sentencia SQL "SELECT ““TABLE_ID””, COUNT(
) AS ““COUNT”” FROM ““METABASE_FIELD”” WHERE ((”“TABLE_ID”" IN NULL[]) AND ““ACTIVE”” = TRUE AND ("“SPECIAL_TYPE”" IN (?, ?))) GROUP BY ““TABLE_ID”” “; se esperaba “(””
"Syntax error in SQL statement "SELECT ““TABLE_ID””, COUNT(
) AS ““COUNT”” FROM ““METABASE_FIELD”” WHERE (("“TABLE_ID”" IN NULL[]) AND ““ACTIVE”” = TRUE AND ("“SPECIAL_TYPE”" IN (?, ?))) GROUP BY ““TABLE_ID”” “; expected “(”; SQL statement:”
"SELECT “TABLE_ID”, count(
) AS “COUNT” FROM “METABASE_FIELD” WHERE ((“TABLE_ID” in NULL) AND “ACTIVE” = TRUE AND (“SPECIAL_TYPE” in (?, ?))) GROUP BY “TABLE_ID” [42001-197]"
“SQLState: 42001”
“Error Code: 42001”]}


#2

Create a new user in SQL. Deny them rights to the tables you don’t want them to see.
It might be easier to just deny them rights to all the tables, then grant them rights to some views on those tables. Views would also give you more flexibility.
Use the new user account for the connection.


#3

thank you very much, I try it and I say