copy_to API When Loading Data into PTI Table | Teradata Python Package - copy_to API When Loading Data into PTI Table - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
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 range using the following:
con = get_connection().connection
cur = con.cursor()
td_cur = cur.execute(“exec DBC.TD_TIMESERIES_RANGE('MyDB.table_name')”)
td_cur.fetchall()
Where:
  • 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.

If a table is to be created with the same table name after the error is handled, the existing table must be dropped using the argument "if_exists = replace".