Issue while Accessing a View in other Schema | teradataml - Issue while Accessing a View in other Schema - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

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.