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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
| create external table if not exists dim_equ ( equ_id string comment '设备ID', equ_no string comment '设备编号', equ_model_cd string comment '设备型号代码', equ_model_name string comment '设备型号名称', equ_brand_cd string comment '设备品牌代码', equ_brand_name string comment '设备品牌名称', equ_type_cd string comment '设备类型代码', equ_type_name string comment '设备类型名称', equ_spec string comment '设备规格', unit_name string comment '计量单位名称', core_part_id string comment '核心部位ID', nameplate_no string comment '铭牌编号', motor_no string comment '发动机编号', mach_no string comment '主机编号', rels_date date comment '出厂日期', rgst_date date comment '注册日期', recv_date date comment '到货日期', stock_date date comment '入库/接收日期', acpt_date date comment '验收日期', equ_use_type_cd string comment '设备使用机制代码:10自有;30转租;50销售', equ_prop_cd string comment '设备产权代码:10自有;20融资;30外协', asset_type_cd string comment '资产分类代码:10租赁设备;20辅助租赁设备;30生产性设备', car_type_cd string comment '车辆类型代码:10服务车;20清障车;30运输车', car_plate_type_cd string comment '号牌种类代码:1大型 汽车;2小型汽车;51新能源大车;52新能源小车', equ_stand_cd string comment '设备标准代码:10国标;20美标;30欧标', equ_new_state_cd string comment '设备新旧状态代码:10新设备 20二手设备', check_state_cd string comment '验收状态代码:10合格;20让步接收;30待维修', lock_state_cd string comment '锁机状态代码:0.未锁机;1.已锁机;10.锁机执行中;11.解锁执行中', is_operate_asset string comment '是否经营性资产:1是 0 否', is_stop string comment '是否停机待复核:1是 0否', is_bind_gps string comment '是否绑定GPS:0否;1是', is_overhaul string comment '是否大修:1是 0否', sap_main_asset_no string comment 'SAP主资产号', sap_status_cd string comment 'SAP接口状态 -1:撤销建卡,0:未建卡,1: 已建卡,999:期初', quality_hour int comment '质保小时数', quality_dt date comment '质保期截止日', vendor_cd string comment '供应商代码', vendor_name string comment '供应商名称', equ_pur_no string comment '采购订单编号', equ_notax_price string comment '不含税资产价格', equ_tax_price string comment '含税资产价格', accept_ad_no string comment '验收人AD账号', create_ad_no string comment '创建人AD账号', create_time timestamp comment '创建时间', edit_ad_no string comment '更新人AD账号', edit_time timestamp comment '更新时间', sys_def_time timestamp comment '系统默认时间', store_id string comment '设备归属门店ID', store_cd string comment '设备归属门店代码', store_name string comment '设备归属门店名称', store_erp_cd string comment '对应ERP门店代码', dept_id string comment '事业部ID', dept_cd string comment '事业部代码', dept_name string comment '事业部名称', serv_belg_store_cd string comment '服务归属营业店代码', serv_belg_store_name string comment '服务归属营业店名称', serv_belg_whs_cd string comment '服务归属仓库代码', serv_belg_whs_name string comment '服务归属仓库名称', network_type_cd string comment '设备所在网点类型代码:1基地;3营业店;4服务驻点;5客户工地;6资产仓;7存货仓;8暂放单;9项目', network_cd string comment '设备所在网点代码', network_name string comment '设备所在网点名称', equ_card_state_cd string comment '设备卡片状态代码:10023待入库;10024已入库;10092已归还;10093待销售;10094已销售;10091已停用;100已废弃', equ_use_state_cd string comment '设备启用状态代码:10正常(租赁),20已停用(租赁),30已归还(租赁),50正常(销售),60 已停用(销售)', equ_lease_state_cd string comment '设备租赁状态代码:1110待租;1120订单占用;1121内场工单占用;1140进场中;1150在租;1170退场中;1195停租;9110无效', equ_position_state_cd string comment '设备位置状态代码 1010在途,1015在库,1020公司基地(非仓库内),1025客户现场(非在租),1030客户现场(在租),1090其他', equ_repair_state_cd string comment '设备维修状态代码:1260待清洗,1270清洗中,1280待检修,1290检修中,1250待维修,1230维修中,1210正常', item_id string comment '商品ID', item_cd string comment '商品代码', item_name string comment '商品名称', fty_model_cd string comment '厂家型号编码', etl_time timestamp comment '数据加载时间', is_modif_vhc string comment '是否改装车:0否;1是', is_try_vhc string comment '是否试用车:0否;1是', try_vhc_use_type_cd string comment '试用车使用类型代码:1长期采购-检查使用;2长期采购-验收使用', jv_prod_line_cd string comment 'JV产品线代码:10道路,20通用设备,30叉车,40电力,50支护系统,70模架系统,80临建', year_check_exp_date timestamp comment '年检到期日', lics_num string comment '牌照号码', envi_lics_num string comment '环保号牌', efflut_std string comment '排放标准', espec_rgst_cd string comment '特种设备注册登记代码', espec_rgst_status_cd string comment '特种设备注册登记状态:0未知;1使用;2停用;3注销', espec_rgst_date timestamp comment '特种设备注册登记日期', espec_use_rgst_no string comment '特种设备使用登记证编号', is_espec_equ string comment '是否特种设备', light_asset_vdr_cd string comment '轻资产供应商编码', light_asset_vdr_name string comment '轻资产供应商名称', comp_cd string comment '所属公司编号', comp_name string comment '所属公司名称', resp_org_cd string comment '所属责任部门编码', resp_org_name string comment '所属责任部门名称', resp_person_ad_no string comment '所属责任人AD账号', resp_person_name string comment '所属责任人姓名', overhaul_date timestamp comment '大修日期', recv_mode_cd string comment '接收方式代码:10基地接收入库;20现场接收入库', check_acpt_ad_no string comment '验收人AD账号', check_acpt_name string comment '验收人姓名', notes string comment '备注', equ_age string comment '设备年限', rgst_plat_desc string comment '注册平台描述', asset_prop_type_cd string comment '资产产权类型代码:10:自有, 20:长租(外协), 30:点租(外协)', fin_name string comment '融资方名称', fin_no string comment '融资方编号', main_account_set_code string comment '设备基础-账套信息', currency_code string comment '币种', equ_procure_mode string comment '设备采购模式', license_number string comment '许可证编号', stained_level string comment '污损等级', group_currency_equ_notax_price decimal(38, 6) comment '集团本位币-不含税资产价格', group_currency_equ_tax_price decimal(38, 6) comment '集团本位币-含税资产价格', is_lower_eff_asset int comment '设备是否低效资产, 1:是 0:否', fin_asset_belong string comment '资产所属主体_财务卡', fin_asset_property string comment '资产产权_财务卡', fin_asset_status string comment '财务资产卡状态', nominal_purchase_price string comment '名义采购价', cost_share_lvl int comment '成本分摊层级:10 营业店 20 区域 30 业务部 40 公司', height string comment '平台高度', powerresources string comment '动力源', asset_accounting_store_code string comment '资产核算营业店编码', asset_accounting_store_name string comment '资产核算营业店名称', asset_accounting_store_code_saas string comment '资产核算营业店编码-saas编码', asset_accounting_store_name_saas string comment '资产核算营业店名称-saas名称', equ_age_fin_caliber int comment '设备年限(财务口径)', card_type int comment '设备卡片类型: 0:固定资产卡,1:非固定资产卡', special_work_env string comment '10: 粉刷涂装(涂料), 30: 涉水环境(地铁、隧道、基坑等), 40: 船厂(造船), 50: 船厂(修船), 20: 非特殊作业, 60: 镍矿(工业园区)', health_level string comment '设备健康度' ) 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_equ' TBLPROPERTIES ( 'comment' = '设备信息表', 'transient_lastDdlTime' = '1778137731', 'bucketing_version' = '2', 'parquet.compression' = 'snappy' );
|