Use in_schema() Function to Access a Table in a Non-Default Teradata Database

Teradata® Python Package User Guide

brand
Teradata Vantage
prodname
Teradata Python Package
vrm_release
16.20
category
User Guide
featnum
B700-4006-098K

When you create a connection to Teradata Vantage, you have the option to either specify a default database, or rely on the default database of the Teradata user. However, it is also possible to interact with the tables in a database other than the default by using the in_schema() function from the DataFrame package.

Example

The following example creates a DataFrame "df" from the existing Teradata view "dbcinfo" in the non-default database "dbc" using the in_schema() function.

>>> from teradataml.dataframe.dataframe import in_schema
>>> df = DataFrame(in_schema("dbc", "dbcinfo"))

Enter df to display the DataFrame:

>>> df
				 InfoKey     InfoData
0                RELEASE  16.20.12.01
1                VERSION  16.20.12.01