Solved

Display view

  • 16 February 2023
  • 13 replies
  • 198 views

  • Participating Frequently
  • 7 replies

Hi,

i am problem with display view from my DB.I configured data source and use non public schema (custom schema name)
After connect over data connector to my DB (in Model) - returns back only tables no views. The user has set permission to select from views.

If I try the same situation with just the public schema, I see tables and views.

Isn't the problem that I have the view in a different schema than the public?

 

Thank you for your answers

Best regards

David Haškovec

icon

Best answer by Jan Kos 17 April 2023, 13:48

View original

13 replies

Hi Jan,

I'm sorry to respond now. But I think where is the problem - problem is in number of tables and vies in my schema. I have a 1523 tables and 931 views in my schema.

It is that problem. After load data from schema I don't see all tables and no view..

Can you find any solution for me?

 

Thanks

Userlevel 2

Hi David,

I’m truly sorry, you followup question slipped under our radar.

Displaying tables and views in LDM modeller shouldn’t be a problem as I didn’t have a problem during my testing. Have you tried setting up a new user with required permissions mentioned above and still unable to see the views?

If you are still unable see the views after, can you please share what are the exact permissions applied to the user? Also what version is your Postgres DB on?

Thank you.

-Jan

Hello,

please give me a answer..

Thanks

Hello,

I've turned on SQL query logging and we've been testing the SQL that GD calls directly. After manually calling it, we get back both the list of tables and the view
Could the problem be that the interface can't display multiple records? Both tables and views?
Is it possible to contact you (Jan Kos) directly by phone?

 

Hi Jan,

hmm OK. I will try again and check permissions.

 

Thanks

Userlevel 2

Hi David,

I tried to connect to Postgres datasource with my custom schema and I can see views without an issues given that my user has usage granted on the schema.

I would suggest you try to compare the permissions for your user on the public schema and on your custom schema to see where it differs. Also try to check permissions on the views within your custom schema for your user.

-Jan

Userlevel 3

Hi David, 

 

Thank you for the additional details. I’ve reached out to you internally. 

 

-Moises

My data source look like this

All grant to user, schema, select, views is set

Userlevel 2

Hi David,

Have you specified the correct schema as pointed on step 5. in the mentioned doc page?
 

If you have the correct schema specified on the datasource, can you please confirm if the user/role used on the user has especially those four access rights?

GRANT CONNECT ON DATABASE {database_name} TO ROLE {role_name};
GRANT USAGE ON SCHEMA {schema_name} TO ROLE {role_name};
GRANT SELECT ON ALL TABLES IN SCHEMA {schema_name} TO ROLE {role_name};
GRANT SELECT ON ALL VIEWS IN SCHEMA {schema_name} TO ROLE {role_name};

Jan

Yes, my user has access rights.

I followed the link - https://www.gooddata.com/developers/cloud-native/doc/cloud/connect-data/create-data-sources/postgresql/#configure-user-access-rights

The problem is only when using other schemas instead of public schema.

When I try to connect to the DB with another client (DBeaver) with the same user etc. everything is fine

Userlevel 2

Hey David, 

 

You have mentioned that the permission to select from views is there. However, you should also make sure that the user has usage rights to the scheme where the views are created:

https://www.gooddata.com/developers/cloud-native/doc/cloud/connect-data/create-data-sources/postgresql/#configure-user-access-rights

Helo Julius,

you are using GoodData cloud and Postgresql DB

Userlevel 2

Hello David, 

 

Can you please confirm what GoodData product are you using and also what kind of database? 

 

Thanks, 

Reply