store.sql 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. create database if not exists ${DB};
  2. use ${DB};
  3. drop table if exists store;
  4. create external table store
  5. (
  6. s_store_sk int,
  7. s_store_id string,
  8. s_rec_start_date string,
  9. s_rec_end_date string,
  10. s_closed_date_sk int,
  11. s_store_name string,
  12. s_number_employees int,
  13. s_floor_space int,
  14. s_hours string,
  15. s_manager string,
  16. s_market_id int,
  17. s_geography_class string,
  18. s_market_desc string,
  19. s_market_manager string,
  20. s_division_id int,
  21. s_division_name string,
  22. s_company_id int,
  23. s_company_name string,
  24. s_street_number string,
  25. s_street_name string,
  26. s_street_type string,
  27. s_suite_number string,
  28. s_city string,
  29. s_county string,
  30. s_state string,
  31. s_zip string,
  32. s_country string,
  33. s_gmt_offset float,
  34. s_tax_precentage float
  35. )
  36. row format delimited fields terminated by '|'
  37. location '${LOCATION}';