copy_to API When Loading Data into PTI Table | Teradata R Package - 16.20 - copy_to API When Loading Data into PTI Table - Teradata R Package

Teradata® R Package User Guide

Product
Teradata R Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2022-05-02
dita:mapPath
qbt1519078127352.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
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('MyDB.<table_name>')”)
Where:
  • con is the connection object
  • MyDB is the schema 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. Hence, 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.