-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metabase v0.48.4: Problem connecting CrateDB #153
Comments
Hi there, thanks for your report. Can you provide more information around the problem you are running into, in order to support us to investigate and resolve this issue optimally? 1
With kind regards, Footnotes
|
@amotl Thanks for creating this ticket. I tried this with the latest Metabase image from Docker, running locally and connecting it to a CRFREE Cluster in CrateDB Cloud. The issue I'm facing is that once I've created the database connection, it starts syncing tables, but it never stops. I've tried it with two different data samples, the weather_data first (9.3 MB), and since it took forever, I tried it with a smaller one, the marketing_data sample (217 KB), but the same here. I can click on "Dismiss sync spinner manually," and the spinner goes away, but the data is still not synced after ~15 minutes. |
Hi again. We have been able to validate the integration with Metabase worked well until v0.48.3, and started failing with v0.48.4. It might be related to this SQL statement that reflects table privileges, which might have been updated, and trips CrateDB. with table_privileges as (
select
NULL as role,
t.schemaname as schema,
t.objectname as table,
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'UPDATE') as update,
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'SELECT') as select,
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'INSERT') as insert,
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'DELETE') as delete
from (
select schemaname, tablename as objectname from pg_catalog.pg_tables
union
select schemaname, viewname as objectname from pg_catalog.pg_views
union
select schemaname, matviewname as objectname from pg_catalog.pg_matviews
) t
where t.schemaname !~ '^pg_'
and t.schemaname <> 'information_schema'
and pg_catalog.has_schema_privilege(current_user, t.schemaname, 'USAGE')
)
select t.*
from table_privileges t;
With version v0.48.3, this was apparently just a warning, not failing the
|
In Maybe there are some hints in the Driver Interface Changelog for Metabase 0.49.0? |
The reason why this SQL statement trips, by the way, is because it uses identifiers When quoting them properly, this particular query works well. with table_privileges as (
select
NULL as "role",
t.schemaname as "schema",
t.objectname as "table",
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'UPDATE') as "update",
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'SELECT') as "select",
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'INSERT') as "insert",
pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'DELETE') as "delete"
from (
select schemaname, tablename as objectname from pg_catalog.pg_tables
union
select schemaname, viewname as objectname from pg_catalog.pg_views
union
select schemaname, matviewname as objectname from pg_catalog.pg_matviews
) t
where t.schemaname !~ '^pg_'
and t.schemaname <> 'information_schema'
and pg_catalog.has_schema_privilege(current_user, t.schemaname, 'USAGE')
)
select t.*
from table_privileges t; |
Proposals
Footnotes
|
Problem
On the comments to the video Metabase and CrateDB: Data Visualization, a few users, possibly @salamander101 and @JoeHan007, reported that:
The text was updated successfully, but these errors were encountered: