简体   繁体   中英

Db2 to Netezza migration

I am working on SAS and I don't have knowledge on Db2 and Netezza. Now my requirement is to migrate below code from DB2 to Netezza. So could you please help me out on this?

Here is my code:

CREATE TABLE acct_grp_holder (
      acct_num          CHAR(7)       NOT NULL,
      grp_num           CHAR(9)       NOT NULL
    )
    PARTITIONING KEY (grp_num)      
    IN ts_mdc1 /*Not aware what's the meaning of IN here*/
    ORGANIZE BY (grp_num)
    NOT LOGGED INITIALLY 
);

Thanks in advance.

Without knowing the intended use for the table (eg if this for permanent user or part of your data preparation process for use in SAS), here is starting point for your conversion.

CREATE TABLE acct_grp_holder (
      acct_num          CHAR(7)       NOT NULL,
      grp_num           CHAR(9)       NOT NULL
    )
    DISTRIBUTE ON (grp_num)      
  --DISTRIBUTE ON RANDOM
    ORGANIZE ON (grp_num)

;

The PARTITIONING KEY clause is roughly equivalent to the Netezza DISTRIBUTE ON clause. However, without knowing anything about your data, we can't tell if using "DISTRIBUTE ON RANDOM" would be a better fit.

The ORGANIZE BY clause in the original indicates an MDC table. The ORGANIZE ON clause in the Netezza is a rough conceptual fit for this.

There is no need, or ability, to specify as tablespace for the table (the IN clause) or logging behavior.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM