drop table dw.fct_so;
create table dw.fct_so
(
so_id bigint comment '订单ID',
parent_so_id bigint comment '父订单ID (如果未拆单,则等于so_id)',
order_code string comment '订单编码',
order_amt float comment '订单金额(产品总额+运费)',
actl_order_amt float comment '实付金额',
actl_order_amt_prev float comment '实付金额原始值',
order_coupon_amt float comment '抵用券抵扣金额',
order_promotion_amt float comment '参加促销立减金额(满减订单统计促销金额大于0)',
product_amt float comment '产品总额',
user_id bigint comment '账户ID -1:快速下单',
order_delivery_amt float comment '运费',
order_delivery_amt_prev float comment '运费原始值',
order_status int comment '订单状态:1-待买家付款,2-待发货,3-待买家确认收货,4-退款退货中,5-交易成功,6-交易关闭,100-待买家付款,101-待发货,102-待买家确认收货,103-交易成功,104-交易关闭',
payment_method int comment '付款方式:1-线上支付,2-分期,3-线下支付,4-货到付款',
payment_period int comment '分期付款期数',
payment_status int comment '支付状态:1-未付款,2-已付款,3-退货中,4-部分付款',
pay_mode int comment '支付方式(通过什么途径(中间方第三方)支付):0-默认,1-微信app支付,2-POS银行卡支付,3-祥付宝快捷支付,4-现金支付,5-微信条码,6-微信扫码,7-支付宝扫码,8-支付宝网关支付,9-支付宝手机快捷支付,10-祥付宝收银台支付,11-支付宝条码,12-支付宝app支付,13-银联B2B,14-银联B2C,15-银联APP,16-余额支付,17-支付宝H5,18-现金核销,19-快捷支付',
order_create_time string comment '创建时间',
order_pay_time string comment '支付时间',
order_confirm_time string comment '订单审核时间',
confirm_operator_id bigint comment '订单审核人ID',
order_delivery_time string comment '发货时间',
order_receive_time string comment '收货时间',
order_cancel_time string comment '订单取消时间',
cancel_reason bigint comment '取消原因',
cancel_remark string comment '订单取消备注',
cancel_operator_id bigint comment '订单取消人ID',
order_complete_time string comment '订单完成时间',
complete_operator_id bigint comment '完成操作人',
update_time string comment '更新时间',
update_operator_id int comment '更新人 -1:系统更新,-2:(卓付通)支付回调,20162016:导入数据',
country_id int comment '收货人国家ID',
province_id int comment '收货人省ID',
city_id int comment '收货人城市ID',
county_id int comment '收货人区县ID',
area string comment '收货人四级区域',
address string comment '收货人详细地址',
post_code string comment '收货人邮编',
name string comment '收货人姓名',
phone string comment '收货人手机号',
delivery_company_id bigint comment '配送公司ID',
delivery_code string comment '配送单号',
invoice_title string comment '发票抬头',
invoice_type int comment '发票类型:1-普通发票,2-增值税发票',
merchant_id bigint comment '商家ID,2179:代表物业缴费,0:代表快速下单',
merchant_remark string comment '商家备注',
customer_message string comment '顾客留言',
client_ip string comment '客户端IP地址',
order_type int comment '订单类型',
expect_delivery_time int comment '期望配送时间段:0-不限时间送货,1-仅工作日送货,2-仅双休日、节假日送货',
delivery_type int comment '配送方式,1:自提;2:快递配送;3:货运',
receiver_email string comment '收货人邮箱',
order_source int comment '订单来源:0-字段上线前的历史数据,1-SHOP平台,2-手机平台(2016.10.8后弃用),3-后台订货会(未使用),4-H5下单,5-卓越管家,6-Android,7-IOS,8-订单,100-android,101-ios,102-h5下单,103-代客下单,104-电话下单',
is_disassembled int comment '便利购订单拆单状态(0:不需拆单 1:待拆单 2:拆单成功 3:拆单失败)',
is_used_coupon int comment '是否抵用券 0、未使用 1、平台券 2、档口券',
is_easygo int comment '是否便利购订单(0:不是 1:是)',
is_delay_receive int comment '是否已延迟收货: 0 未延迟, 1 已延迟',
channel_source string comment '渠道来源',
is_leaf int comment '是否叶子节点',
is_audit int comment '拆单前审核',
business_type int comment '业务类型:0-,1-',
etl_update string comment '数据落地时间'
)
comment '订单表' partitioned by (date string comment '日期分区') ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE ;

hive建表结构的更多相关文章

  1. 读取hive的表结构,生成带comment的视图建表语句

    ### 读取hive的表结构,生成带comment的视图建表语句 # 读取配置文件中的表并进行遍历 grep -v '^#' tablesFile|while read tableName do st ...

  2. [Hive_3] Hive 建表指定分隔符

    0. 说明 Hive 建表示例及指定分隔符 1. Hive 建表 Demo 在 Hive 中输入以下命令创建表 user2 create table users2 (id int, name stri ...

  3. MySQL和hive对比表结构脚本

    #!/bin/bash source /etc/profile runlog='/tmp/zewei/check_schema_log' hive_database_schema=/tmp/hive_ ...

  4. Oracle 自动生成hive建表语句

    从 oracle 数据库导数到到 hive 大数据平台,需要按照大数据平台的数据规范,重新生成建表的 SQL 语句,方便其间,写了一个自动生成SQL的存储过程. ① 创建一张表,用来存储源表的结构,以 ...

  5. 利用MySQL原数据信息批量转换指定库数据表生成Hive建表语句

    1.写出文件工具类 package ccc.utile; import java.io.*; /** * @author ccc * @version 1.0.0 * @ClassName Write ...

  6. hive建表与数据的导入导出

    建表: create EXTERNAL table tabtext(IMSI string,MDN string,MEID string,NAI string,DestinationIP string ...

  7. CDH集群部署hive建表中文乱码

    背景:部署CDH集群的 hive 服务,选用 mysql 作为 hive 元数据的存储数据库,通过 hive cli 建表时发现中文注释均乱码. 现象:hive端建表中文注释乱码. 定位: 已经确认过 ...

  8. Hive改表结构的两个坑|避坑指南

    Hive在大数据中可能是数据工程师使用的最多的组件,常见的数据仓库一般都是基于Hive搭建的,在使用Hive时候,遇到了两个奇怪的现象,今天给大家聊一下,以后遇到此类问题知道如何避坑! 坑一:改变字段 ...

  9. Hive建表和内外部表的使用

    原文链接: https://www.toutiao.com/i6766784274965201415 一.普通建表方式 create table stu_info( id int, name stri ...

随机推荐

  1. HideTcpip.c

    隐藏tcp端口,来自看雪 /////////////////////////////////////////////////////////////////////////////////////// ...

  2. Python实现将不规范的英文名字首字母大写

    Python实现将不规范的英文名字首字母大写 这篇文章给大家主要介绍的是利用map()函数,把用户输入的不规范的英文名字,变为首字母大写,其他小写的规范名字.文中给出了三种解决方法,大家可以根据需要选 ...

  3. springboot mybatis 下使用注解组织查询语句(有查询条件传入)

    @Select("<script>" + "select cab.brandpre_id,cab.brandpre_num_app,cab.id,cab.br ...

  4. Python爬虫学习==>第八章:Requests库详解

    学习目的: request库比urllib库使用更加简洁,且更方便. 正式步骤 Step1:什么是requests requests是用Python语言编写,基于urllib,采用Apache2 Li ...

  5. 描述下fastJSON,jackson等等的技术

    ①Jackson:依赖的jar包较少,简单易用性能高,更新速度也比较快,但是对于复杂类型的json转换bean会出 现问题,一些集合Map,List的转换出现问题,对于复杂类型的bean转换Json, ...

  6. 【Linux开发】linux设备驱动归纳总结(五):2.操作硬件——IO内存

    linux设备驱动归纳总结(五):2.操作硬件--IO内存 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ...

  7. JAVA -数据类型与表达式---基本数据类型

    基本数据类型 Java有8种基本数据类型(primitive data type):4种整型.2种浮点型.字符型和布尔型.除此之外的任何类型都用对象表示.本节将详细讨论上述8种基本数据类型. 整型与浮 ...

  8. 论文阅读 | BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain

    BadNets: 识别机器学习模型供应链中的漏洞 摘要 基于深度学习的技术已经在各种各样的识别和分类任务上取得了最先进的性能.然而,这些网络通常训练起来非常昂贵,需要在许多gpu上进行数周的计算;因此 ...

  9. jenkins自动化部署springboot

    一.linux按jar包名称部署 1.执行shell PID=$(ps -ef | grep app.jar | grep -v grep | awk '{ print $2 }') if [ -z ...

  10. 如何在java中去除中文文本的停用词

    1.  整体思路 第一步:先将中文文本进行分词,这里使用的HanLP-汉语言处理包进行中文文本分词. 第二步:使用停用词表,去除分好的词中的停用词. 2.  中文文本分词环境配置 使用的HanLP-汉 ...