Persistence of Tables Created by tdplyr in Vantage | Teradata R Package - Persistence of Tables Created by tdplyr in Vantage - Teradata Package for R

Teradata® Package for R User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for R
Release Number
17.20
Published
March 2024
ft:locale
en-US
ft:lastEdition
2024-04-09
dita:mapPath
efv1707506846369.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
nqx1518630623256
Product Category
Teradata Vantage

When you run a tdplyr analytic function, results are stored as tables in the database that is specified in your Vantage connection (See Testing Connection to Vantage with Teradata SQL Driver for R). However, not all of these resulting tables may be persistent (in permanent storage) in the connection database. Specifically, tables that store models produced by analytic functions are non-persistent work tables (global temporary tables).

The difference is that tables in permanent storage persist across different sessions, whereas global temporary tables are automatically dropped at the end of a session. Therefore, if you establish a Vantage connection in R and call a tdplyr function that creates an analytic model table in the database, when you eliminate the connection, the database session will be terminated and the model table will be automatically dropped from the database.

To preserve a non-persistent model table created by tdplyr, before you disconnect from the session where the model table was created, use the copy_to() function with the model as a table object input to the function.