1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
| create external table if not exists dim_user_emp_info ( saas_ad_no string comment 'saas AD账号', emp_id string comment '员工id', emp_name string comment '员工姓名', gender string comment '性别 0:女 1:男', birthday timestamp comment '生日', email string comment '电子邮箱', sup_id string comment '上级领导账号id', emp_state string comment '在职状态 0.在职 1.离职 -1.未知状态', is_smanager string comment '是否高管 0:否 1:是', leader_type string comment '领导类型 10:非领导 20:二、三级组织负责人且非管理序列', emp_type string comment '员工类型 1:固定职工 2:合同制职工 3:临时职工 4:计划外用工 5:其他 6:劳动合同工 7:长期实习生 8:短期实习生 9:外包 10:劳务派遣 11:业务外包', dept_full_name string comment '所属部门全路径名', org_id string comment '所属部门id', comp_name string comment '所属公司名称', lvl2_id string comment '所属二级组织id', lvl2_cd string comment '所属二级组织代码', lvl2_name string comment '所属二级组织名称', lvl3_id string comment '所属三级组织id', lvl3_cd string comment '所属三级组织代码', lvl3_name string comment '所属三级组织名称', lvl4_id string comment '所属四级组织id', lvl4_cd string comment '所属四级组织代码', lvl4_name string comment '所属四级组织名称', lvl5_id string comment '所属五级组织id', lvl5_cd string comment '所属五级组织代码', lvl5_name string comment '所属五级组织名称', lvl6_name string comment '所属六级组织名称', lvl7_name string comment '所属七级组织名称', entry_date timestamp comment '入职日期', sep_date timestamp comment '离职日期', id_card_type string comment '证件类型 1:身份证 2:护照 3:港澳通行证', id_card_no string comment '证件号码', fin_ownership string comment '财务归属组织名称', fin_belg_comp string comment '财务归属公司名称', fin_belg_comp_cd string comment '财务归属公司代码', data_src string comment '数据来源 0:OA 1:saas 2:ERP', emp_old_no string comment '旧工号(EHR)', sap_fin_id string comment 'sapID费用(系统报销必须使用)', hcm_id string comment 'hcm主键c_oid', emp_no string comment '新工号(HCM)', work_loc string comment '工作地点', contr_type string comment '合同类型代码 0:劳动合同 1:聘用合同 2:劳务派遣 3:外包合同 4:退休返聘协议 5:实习生协议 6:兼职协议', outsrc_type string comment '外包类型代码 1:操作级 2:非操作级', prob_end_date timestamp comment '试用期结束日期', is_anju string comment '是否有安居计划 1 是 2 否', is_tng string comment '是否有培训协议 1是 2否', tng_result string comment '入职培训成绩', is_spec_job string comment '是否特殊作业 1是 2否', grade_cd string comment '职级代码', grade_name string comment '职级名称', job_cd string comment '职务代码 职务code(主职)', job_name string comment '职务名称(主职)', posi_cd string comment '职位代码(主职)', posi_name string comment '职位名称(主职)', erp_id string comment 'ERP id(员工表hx00_staff代理主键)', erp_cd string comment 'ERP code(业务主键)', erp_org_id string comment 'ERP系统组织机构ID', erp_ad_no string comment 'ERP系统AD账号', store_id string comment '所属门店ID', store_cd string comment '所属门店代码', store_name string comment '所属门店名称', wararea_id string comment '所属战区ID', wararea_cd string comment '所属战区代码', wararea_name string comment '所属战区名称', dept_id string comment '所属事业部ID', dept_cd string comment '所属事业部代码', dept_name string comment '所属事业部名称', post_label string comment '岗位信息(只做属性展示 不做业务判断)', contract_comp string comment '合同/协议签订单位', emp_gp string comment '员工组', emp_sub_gp string comment '员工子组', sap_post_id string comment 'SAP岗位ID', sap_post_name string comment 'SAP岗位名称', sap_std_post_cd string comment 'SAP标准岗位编码', sap_std_post_name string comment 'SAP标准岗位名称', sap_zu_cd string comment 'SAP岗位族编码', sap_zu_name string comment 'SAP岗位族名称', sap_post_seq_cd string comment 'SAP岗位序列编码', sap_post_seq_name string comment 'SAP岗位序列', sap_sub_post_seq_cd string comment 'SAP岗位子序列编码', sap_sub_post_seq_name string comment 'SAP岗位子序列', sap_sub2_post_seq_cd string comment 'SAP岗位二级子序列编码', sap_sub2_post_seq_name string comment 'SAP岗位二级子序列', sap_part_time_info array < struct < sap_post_id :string, sap_post_name :string, sap_std_post_cd :string, sap_std_post_name :string, last_dept_cd :string, last_dept_name :string, dept_full_name :string > > comment '员工兼岗信息:岗位ID,岗位名称,标准岗位编码,标准岗位名称,末级部门编码,末级部门编码,部门全路径名称', phone string comment '公司手机号码', cell_phone string comment '个人手机号码', direct_leader_ad string comment '直属上级AD', direct_leader_name string comment '直属上级姓名', direct_leader_emp_no string comment '直属上级员工编号', old_job_number string comment '旧的工号编码', emp_cate_cd string comment '员工分类代码 0.国内 1.中方员工兼岗海外岗位(兼岗) 2.中方派遣海外人员(境内档案)3.中方派遣海外人员(派驻主岗)4.中方派遣海外人员(派驻兼岗)5.中方审批人员6.海外本地员工(主岗)7.海外本地员工兼岗海外岗位(兼岗)8.海外本地员工派驻海外人员(派驻岗)', saas_std_post_code string comment 'SAAS标准岗位编码', saas_std_post_name string comment 'SAAS标准岗位名称' ) comment '员工基本信息维度表' partitioned by (dt string comment '按天分区') ROW FORMAT DELIMITED FIELDS TERMINATED BY '\\\\u0001' STORED AS PARQUET LOCATION 'hdfs://prd-bd66110-zazk02.hd:8020/apps/hive/warehouse/dwd.db/dim_user_emp_info' TBLPROPERTIES ( 'comment' = '员工基本信息维度表', 'transient_lastDdlTime' = '1773898938', 'bucketing_version' = '2', 'parquet.compression' = 'snappy' );
|