hive建表脚本

drop table if exists ld.boi_asset_units;
create table if not exists ld.boi_asset_units
(
    asset_unit_code	                     string         comment'资产单元代码'
   ,asset_unit_name	                     string	        comment'资产单元名称'
   ,asset_unit_group_code	             string	        comment'确认金额'
   ,asset_unit_parent_code	             string	        comment'上级资产单元代码'
   ,asset_unit_parent_name	             string	        comment'上级资产单元名称'
   ,asset_unit_level	                 int		    comment'资产单元层级'
   ,fund_code	                         string	        comment'产品代码'
   ,fund_name	                         string         comment'产品名称'
   ,investment_manager_code	             string         comment'投资经理代码'
   ,investment_manager_name	             string	        comment'投资经理名称'
   ,performance_benchmark_code           string	        comment'业绩基准代码'
   ,performance_benchmark_name           string         comment'业绩基准名称'
   ,status	                             int            comment'状态'
   ,is_forbidden_open	                 int            comment'是否限制开仓 normal=0=正常&forbidden=1=限制开仓'
   ,remark	                             string         comment'备注'
   ,set_up_shares	                     decimal(22,2)  comment'成立规模'
   ,start_date	                         string         comment'成立日期'
   ,end_date	                         string         comment'到期日期'
   ,reviewer_code	                     string	        comment'审核人代码'
   ,reviewer_name	                     string	        comment'审核人名称'
   ,review_status	                     int	        comment'审核状态'
   ,reviewed_at	                         string         comment'审核时间'
   ,is_valid	                         int	        comment'数据是否有效'
   ,created_by	                         string         comment'创建者'
   ,created_at	                         string		    comment'创建时间'
   ,updated_by	                         string         comment'修改者'
   ,updated_at	                         string		    comment'修改时间'
   ,is_tacit_asset	                     decimal(2)	    comment'更新时间'                                 
  
)
  row format delimited fields terminated by "\u0001"
stored as textfile
location '/user/hive/warehouse/ld.db/boi_asset_units';


猜你喜欢

转载自blog.csdn.net/jtpython666/article/details/121609556
今日推荐