web_sales.sql 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. create database if not exists ${DB};
  2. use ${DB};
  3. drop table if exists web_sales;
  4. create external table web_sales
  5. (
  6. ws_sold_date_sk int,
  7. ws_sold_time_sk int,
  8. ws_ship_date_sk int,
  9. ws_item_sk int,
  10. ws_bill_customer_sk int,
  11. ws_bill_cdemo_sk int,
  12. ws_bill_hdemo_sk int,
  13. ws_bill_addr_sk int,
  14. ws_ship_customer_sk int,
  15. ws_ship_cdemo_sk int,
  16. ws_ship_hdemo_sk int,
  17. ws_ship_addr_sk int,
  18. ws_web_page_sk int,
  19. ws_web_site_sk int,
  20. ws_ship_mode_sk int,
  21. ws_warehouse_sk int,
  22. ws_promo_sk int,
  23. ws_order_number int,
  24. ws_quantity int,
  25. ws_wholesale_cost float,
  26. ws_list_price float,
  27. ws_sales_price float,
  28. ws_ext_discount_amt float,
  29. ws_ext_sales_price float,
  30. ws_ext_wholesale_cost float,
  31. ws_ext_list_price float,
  32. ws_ext_tax float,
  33. ws_coupon_amt float,
  34. ws_ext_ship_cost float,
  35. ws_net_paid float,
  36. ws_net_paid_inc_tax float,
  37. ws_net_paid_inc_ship float,
  38. ws_net_paid_inc_ship_tax float,
  39. ws_net_profit float
  40. )
  41. row format delimited fields terminated by '|'
  42. location '${LOCATION}';