Skip to content
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

This package should document what permission are needed to use these views #13

Open
mikekaminsky opened this issue Oct 16, 2018 · 4 comments

Comments

@mikekaminsky
Copy link

mikekaminsky commented Oct 16, 2018

My default analyst role doesn't have the ability to view this relation:

dwh=> select * from redshift_admin.table_stats limit 5;
ERROR:  permission denied for relation stv_tbl_perm

Nor this one:

dwh=> select * from redshift_admin.users_table_view_privileges limit 5;
ERROR:  permission denied for schema
    dev

Important to note, the dev schema doesn't even exist at this point (I dropped it earlier today).

It seems like these views are only queryable by admins :/

@Limess
Copy link

Limess commented Mar 3, 2020

Weirdly even as an admin I have difficulty accessing one of these views.

I get ERROR: permission denied for relation stv_partitions when querying redshift_admin_table_stats but I can happily query that table in isolation.

That could be a separate issue - I can access all the other views.

@clrcrl
Copy link
Contributor

clrcrl commented Mar 3, 2020

Hmmm can you try installing from this fork and checking what happens?

packages:
 - git: "git@github.com:davehowell/redshift.git"
   revision: "fix/qualify-base-model-schemas"

@Limess
Copy link

Limess commented Mar 3, 2020

No luck, I still can't access that view.

Could be something to do with permissions on my side, I can't access a similar view in our own DBT models which uses stv_blocklist but can query that table.

@Limess
Copy link

Limess commented Sep 8, 2020

So my issue was that I was creating the users with a non-super user, so even super users could not access the view as it was using the permissions of the original user.

We'll resolve that by having a separate DBT run which uses a superuser to create only these views.

That probably isn't relevant to the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants