Description
If a user created the context with the same default database, and tried to access the view in the other schema. The user will get an error as - "An owner referenced by user does not have SELECT WITH GRANT OPTION access to [non_default_database].[any_view]"
Cause
User created context with the default database.
Solution
Grant select to the USERNAME on the database where temporary objects are being created.
GRANT SELECT ON USERNAME TO database WITH GRANT OPTION;
teradataml allows user to specify different databases for creating tables and views. You can specify these databases using configuration options:
>>> from teradataml import configure >>> configure.temp_table_database = "database" >>> configure.temp_view_database = "database"
Use these options in cases when user has permissions to create tables in one database and view in other database.
For more details, see temp_table_database and temp_view_database.