Issue while Accessing a View in other Schema | teradataml - Issue while Accessing a View in other Schema - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

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.