copy_to API When Loading Data into PTI Table | Teradata R Package - copy_to API When Loading Data into PTI Table - 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
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
efv1707506846369.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
nqx1518630623256
Product Category
Teradata Vantage
When the copy_to API fails with the Database error message “4358 Time Series: TD_TIMECODE| TD_SEQNO out of range for table”, you must check the permitted TD_TIMECODE and TD_SEQNO ranges based on the other arguments of copy_to() using the following:
DBI::dbGetQuery(con, “exec DBC.TD_TIMESERIES_RANGE('TDAPUSERDB.<table_name>')”)
Where:
  • con is the connection object;
  • TDAPUSERDB is the database name;
  • <table_name> is the name of the table to be created.
And correct the data or the arguments like seq.max to suit the data.
When the data insertion fails, the table is already created.

The failed copy_to() creates the table but fails to load the data. So, if the table is to be created with the same table name, the table has to be dropped by setting the argument overwrite to "TRUE".