-- ----------------------------
CREATE DATABASE IF NOT EXISTS olap_dwd;
USE olap_dwd;

CREATE TABLE IF NOT EXISTS dwd_users  (
    id varchar(100)  NOT NULL,
    name varchar(100)  NOT NULL DEFAULT '',
    authenticated_status smallint(2),
    birthdate date,
    checked_status smallint(2),
    third_party_loginNo varchar(255),
    created_time datetime,
    email varchar(50),
    head_photo varchar(255),
    one_inch_color_white_photo varchar(500),
    telephone varchar(50),
    last_appeal_status tinyint(2),
    id_card_num varchar(100),
    security_certificate_no varchar(1000),
    education varchar(100),
    stature varchar(50),
    nation varchar(100),
    politics_status varchar(100),
    household_type varchar(100),
    marital_status varchar(100),
    military_status varchar(100),
    front_photo varchar(500),
    reverse_photo varchar(500),
    background_screening_status smallint(2),
    cid varchar(200) ,
    last_sync_time datetime,
    last_cer_sync_time datetime
    )PRIMARY KEY (id)
    DISTRIBUTED BY HASH (id)
    PROPERTIES (
    "enable_persistent_index" = "true"
);

