16.20 - Examples: INSERT into a PTI Table - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Time Series Tables and Operations

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1208-162K
Language
English (United States)

Table and Data Definition for INSERT Examples

Below is the table definition for the nonsequenced table used in the following examples.

CREATE TABLE ocean_buoy_no_seq (buoyid INT, temperature INT)
PRIMARY TIME INDEX(TIMESTAMP(6), HOURS(1), COLUMNS(buoyid), NONSEQUENCED);

Following is the table definition displayed by the SHOW TABLE statement.

SHOW TABLE ocean_buoy_no_seq;
  
CREATE SET TABLE my_db.ocean_buoy_no_seq, NO FALLBACK,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO,
     MAP = TD_MAP1
     (
      TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN,
      TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN,
      buoyid INTEGER,
      temperature INTEGER)
PRIMARY TIME INDEX (TIMESTAMP(6), DATE '1970-01-01', HOURS(1), COLUMNS(buoyid), NONSEQUENCED);

Below is the table definition for the sequenced table used in the following examples.

CREATE TABLE ocean_buoy_seq (buoyid INT, temperature INT)
PRIMARY TIME INDEX(TIMESTAMP(6), DATE '2016-01-01', HOURS(1), COLUMNS(buoyid), SEQUENCED);

Following is the table definition displayed by the SHOW TABLE statement.

SHOW TABLE ocean_buoy_seq;

CREATE SET TABLE my_db.ocean_buoy_seq, NO FALLBACK,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO,
     MAP = TD_MAP1
     (
      TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN,
      TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN,
      TD_SEQNO INT NOT NULL GENERATED TIMECOLUMN,
      buoyid INTEGER,
      temperature INTEGER)
PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2016-01-01', HOURS(1), COLUMNS(buoyid), SEQUENCED(20000));