Search code examples
teradatasas-dis

Partition a table in teradata using SAS DI studio 4.902


For ETL operations we use SAS DI studio and then finally the tables are loaded in Teradata. DDL is dynamically generated in SAS DI Studio for the tables created. But when we want to customize the DDL to include partitions it throws an error. Can anyone suggest a workaround? Note: We cannot create the DDL in Teradata first and then register the table in SAS DI Studio to be using it.

In the table properties->Options->advanced and write custom SQL in create table option it works fine for UNIQUE PRIMARY INDEX(NOTI_DT) But when we try

UNIQUE PRIMARY INDEX(NOTI_DT)
PARTITION BY RANGE_N(NOTI__DT BETWEEN DATE'1950-01-01'AND DATE'2022-12-31' EACH INTERVAL '1' MONTH)

it throws an error: image 1


Solution

  • The "invalid option name" error appears to be due to having quotes within the option string. Try doubling the quotes:

    UNIQUE PRIMARY INDEX(NOTI_ASSIGN_DT)
    PARTITION BY RANGE_N(NOTI_ASSIGN_DT BETWEEN DATE''1950-01-01'' AND DATE''2022-12-31'' EACH INTERVAL ''1'' MONTH)