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 stg_se_tax_invoice ( id string comment '主键id', tax_invoice_id string comment '单据标识', bill_type string comment '单据类型', no string comment '单据编号', bill_date string comment '单据日期', status string comment '状态', corp_id string comment '公司', creator string comment '制单人', creator_id string comment '制单人ID', updator string comment '修改人', updator_id string comment '修改人ID', auditor string comment '审批人', auditor_id string comment '审批人ID', audit_time string comment '审批日期', pay_unit string comment '“”', provide_status string comment '发放状态', invoice_no string comment '开票编号', total_amount string comment '总金额', biz_unit string comment '事业部', biz_area string comment '区域', tax_invoice_no string comment '金税发票号码', invoice_dept string comment '开票部门 ', biz_shop string comment '营业店', renting_cust string comment '签约方', ro_nos string comment '租赁订单', settle_nos string comment '结算单号', invoice_type string comment '票据类型', tax_match_no string comment '发票代码', cus_fax_no string comment '客户税号', cus_adr_tel string comment '客户地址电话', cus_bank_accunt string comment '银行及帐号', tax_invoice_date string comment '开票日期', total_tax_amount string comment '总税额', biz_company string comment '所属公司', tax_rate string comment '税率', tax_amount string comment '发票金额', invoice_agent string comment '发票代寄', edit_date string comment '业务修改日期', create_time string comment '系统创建时间', edit_time string comment '系统修改时间', sync_time string comment '同步时间', delete_flag string comment '0.表示正常 1.表示逻辑删除', tax_invoice_status string comment '开票状态,10未开票、20已开票、30已作废', model_type string comment '规格型号', price string comment '单价', qty string comment '数量,默认为1.00', unit string comment '单位', is_tax string comment '是否含税:0否/1是', payee string comment '收款人', reviewer string comment '复核人', drawer string comment '开票人', data_source string comment '数据来源:1ERP/2TP,默认为1ERP', is_print string comment '是否打印,0否/1是,默认为1', is_generate_express string comment '是否生成邮寄快递单,0否/1是,默认为0', jv_merchant_code string comment '商户编号', jv_shop_code string comment '店铺编码', jv_pro_line string comment '业务线', pdf_url string comment '金税pdf地址', invoice_situation string comment '发票形势', hand_mode string comment '交接方式', business_type string comment '业务类型', g3_push_status string comment '推送状态', invoice_title string comment '发票抬头', inside_note_type string comment '对内备注类型:0无/1发票影像/99其他备注', inside_note string comment '对内备注', se_invoice_no string comment '应收发票编号', se_invoice_bill_date string comment '应收发票单据时间', fail_message string comment '失败原因', invoice_typeface string comment '发票类型 0 蓝字 1 红字', relation_invoice_num string comment '关联发票号码', relation_tax_invoice_id string comment '关联金税id', file_url string comment '附件地址url', upload_flag string comment '上传状态(0否 1是)', financial_remark string comment '财务备注', financial_remark_flag string comment '是否财务备注(0否 1是)', file_url_ofd string comment 'ofd附件地址url', upload_flag_ofd string comment 'ofd上传状态(0否 1是)', file_url_xml string comment 'xml附件地址url', upload_flag_xml string comment 'xml上传状态(0否 1是)', issue_type string comment '开票类型 0 自动 1人工', account_set_code string comment '账套编码', account_set_version string comment '账套版本号', currency_code string comment '币种code', customer_mmp_id string comment '客户mmpid', biz_unit_saas_code string comment '事业部code', biz_company_saas_code string comment '公司code', biz_shop_saas_code string comment '营业店code', ci_invoice_date string comment 'CI开票日期', withholding_tax_amount string comment '预扣税金额', tax_rate_code string comment '税率编码', terms string comment '付款期限', relation_in_tax_no string comment '关联IN发票号码', nn_invoice_serial_num string comment '诺诺开票流水号', nn_invoice_message string comment '诺诺开票消息', tax_invoice_url string comment '金税url', invoice_definition string comment '发票定义0蓝字1红字', create_type string comccment '创建方式', tax_receipt_invoice_status string comment '税票状态', qr_code_url string comment '二维码链接' ) comment '金税发票主表' partitioned by (dt string comment '日期', et string comment '服务名') ROW FORMAT DELIMITED FIELDS TERMINATED BY '\\u0001' STORED AS TEXTFILE LOCATION 'hdfs://prd-bd66110-zazk02.hd:8020/apps/hive/warehouse/stg.db/stg_se_tax_invoice' TBLPROPERTIES ( 'comment' = '金税发票主表', 'transient_lastDdlTime' = '1777337854', 'bucketing_version' = '2', 'text.compress' = 'BZIP2' );
|