Accessing Table in Non-Default Database in Vantage | Teradata R Package - 17.00 - Accessing Table in Non-Default Database in Teradata Vantage - Teradata R Package

Teradata® R Package User Guide

Teradata R Package
November 2020
User Guide

When you create a connection to 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 tables in a database other than the default by using the in_schema() function of the dbplyr package.

To interact with a database other than the default, your connection user account must have appropriate permissions on the target database granted by the database administrator.


Assume that as user "tdapUser", you want to create a table "iris_flowers" in the user database "tdapUser", while your default database is "tdapUserDB".

copy_to(con, iris, in_schema("tdapUser", "iris_flowers"))
The above syntax must be observed to interact successfully with a non-default database. Using copy_to(con, iris, "tdapUser.iris_flowers") is wrong syntax and the statement does not work.