简体   繁体   English

从DB2到Netezza的迁移

[英]Db2 to Netezza migration

I am working on SAS and I don't have knowledge on Db2 and Netezza. 我正在使用SAS,但对Db2和Netezza不了解。 Now my requirement is to migrate below code from DB2 to Netezza. 现在,我的要求是将以下代码从DB2迁移到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. 在不知道表的预期用途的情况下(例如,如果是永久用户使用的,或者是在SAS中使用的数据准备过程的一部分),这就是转换的起点。

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. PARTITIONING KEY子句与Netezza DISTRIBUTE ON子句大致等效。 However, without knowing anything about your data, we can't tell if using "DISTRIBUTE ON RANDOM" would be a better fit. 但是,在不了解您的数据的情况下,我们无法确定使用“ DISTRIBUTE ON RANDOM”是否更合适。

The ORGANIZE BY clause in the original indicates an MDC table. 原始的ORGANIZE BY子句指示MDC表。 The ORGANIZE ON clause in the Netezza is a rough conceptual fit for this. Netezza中的ORGANIZE ON子句对此很适合。

There is no need, or ability, to specify as tablespace for the table (the IN clause) or logging behavior. 没有必要或没有能力指定表(IN子句)或日志记录行为的表空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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