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. shaderToy学习篇

    觉得shadertoy上的一些网友的作品写得很好,加上自己对glsl一些内置函数,内置变量不是很熟悉,于是决定开始学习一下上面一些大佬的代码. 今天的案例是这个: 附上shaderToy的地址:htt ...

  2. java:solr

    1.solr(数据导入solr自带数据库):   ImportItemController.java: package com.solr.controller; import org.springfr ...

  3. BCP 数据导出

    EXEC master..xp_cmdshell 'BCP test.dbo.name out d:\t_002.txt -c -t -T' EXEC master..xp_cmdshell 'BCP ...

  4. Django 邮箱找回密码!!!!!!!!!!!!!!!!

    1.大概流程. @首先在完善登陆页面,增加忘记密码的链接. @为了账户安全,需要对操作者进行验证,向邮箱发随机数验证! @在重置验证码页面,验证验证码是否匹配(验证成功跳转至更改密码也页面). @ 重 ...

  5. 【POJ - 3009】Curling 2.0 (dfs+回溯)

    -->Curling 2.0 直接上中文 Descriptions: 今年的奥运会之后,在行星mm-21上冰壶越来越受欢迎.但是规则和我们的有点不同.这个游戏是在一个冰游戏板上玩的,上面有一个正 ...

  6. 【VS开发】CTimeSpan类

    CTimeSpan类.        日期和时间类简介        CTime类的对象表示的时间是基于格林威治标准时间(GMT)的.CTimeSpan类的对象表示的是时间间隔.        CTi ...

  7. EntityFramework数据迁移(笔记)

    1.启用迁移 在Package Manager Console中运行Enable-Migrations命令 此命令已将Migrations文件夹添加到我们的项目中,此新文件夹包含两个文件: Confi ...

  8. lambda常用方法

    一:forEach()  循环遍历 List<Integer> costBeforeTax = Arrays.asList(100, 200, 300, 400, 500); costBe ...

  9. 关于一个查询的JAVA界面,希望对你有启发

    package work2; import java.awt.BorderLayout; import javax.swing.JButton; import javax.swing.JFrame; ...

  10. linux基础命令<二>

    1.关机 init 0   poweroff   halt  shutdown –h   now 2.重启 init 6   reboot  shutdown –r now 3.查询都有那些用户在系统 ...