analyze_date_dim.sql.sql 640 B

123456789101112131415
  1. -- Use filesystem to track stats.
  2. set hive.stats.dbclass=fs;
  3. -- Many tables have some missing partitions, deal with this by ignoring errors.
  4. set hive.cli.errors.ignore=true;
  5. ANALYZE TABLE date_dim COMPUTE STATISTICS;
  6. ANALYZE TABLE date_dim COMPUTE STATISTICS FOR COLUMNS
  7. d_date_sk, d_date_id, d_date, d_month_seq, d_week_seq,
  8. d_quarter_seq, d_year, d_dow, d_moy, d_dom, d_qoy, d_fy_year,
  9. d_fy_quarter_seq, d_fy_week_seq, d_day_name, d_quarter_name,
  10. d_holiday, d_weekend, d_following_holiday, d_first_dom,
  11. d_last_dom, d_same_day_ly, d_same_day_lq, d_current_day,
  12. d_current_week, d_current_month, d_current_quarter,
  13. d_current_year;