Show a PTI Table Example | Teradata Vantage - 17.10 - Example: Show a PTI Table - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1208-171K
Language
English (United States)

Examples: Show a PTI Table

Below is the table definition for an example of a table that uses the timebucket option without sequencing:
CREATE TABLE ts_timebucketonly_nonseq (i INT, j INT, k INT)
    PRIMARY TIME INDEX(TIMESTAMP(6), DATE '2016-10-01', HOURS(2));
This statement lists the table definition for ts_timebucketonly_nonseq:
SHOW TABLE ts_timebucketonly_nonseq;

The SHOW TABLE output includes the two generated columns, TD_TIMEBUCKET and TD_TIMECODE, in addition to default values for the table creation options that were not specified.

CREATE SET TABLE ts_timebucketonly_nonseq, 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,
      i INTEGER,
      j INTEGER,
      k INTEGER)
 PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2016-10-01', HOURS(2), NONSEQUENCED);