DESY3 MICE2 source catalog

From Public PIC Wiki
Revision as of 00:05, 22 April 2020 by Jcarrete (talk | contribs) (Created page with "notebook donde convierto los FITS files en parquet files: CREATE EXTERNAL TABLE jcarrete.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_pq ( `unique_gal_id` BIGINT, `z_cgal`...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

notebook donde convierto los FITS files en parquet files:

CREATE EXTERNAL TABLE jcarrete.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_pq (

   `unique_gal_id` BIGINT,
   `z_cgal` DOUBLE,
   `ra_gal` DOUBLE,
   `dec_gal` DOUBLE,
   `g_sof` DOUBLE,
   `r_sof` DOUBLE,
   `i_sof` DOUBLE,
   `z_sof` DOUBLE,
   `z_dnf_mean_sof` FLOAT,
   `z_dnf_mc_sof` FLOAT,
   `des_asahi_full_g_true` FLOAT,
   `des_asahi_full_r_true` FLOAT,
   `des_asahi_full_i_true` FLOAT,
   `des_asahi_full_z_true` FLOAT,
   `kappa` FLOAT,
   `gamma1` FLOAT,
   `gamma2` FLOAT,
   `eps1` DOUBLE,
   `eps2` DOUBLE

) STORED AS PARQUET LOCATION '/user/jcarrete/data/mice/des_y3_mice2_source_catalog_IA_mocks'


CREATE TABLE cosmohub.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_c (

  `unique_gal_id` BIGINT,
   `z_cgal` DOUBLE,
   `ra_gal` DOUBLE,
   `dec_gal` DOUBLE,
   `g_sof` DOUBLE,
   `r_sof` DOUBLE,
   `i_sof` DOUBLE,
   `z_sof` DOUBLE,
   `z_dnf_mean_sof` FLOAT,
   `z_dnf_mc_sof` FLOAT,
   `des_asahi_full_g_true` FLOAT,
   `des_asahi_full_r_true` FLOAT,
   `des_asahi_full_i_true` FLOAT,
   `des_asahi_full_z_true` FLOAT,
   `kappa` FLOAT,
   `gamma1` FLOAT,
   `gamma2` FLOAT,
   `eps1` DOUBLE,
   `eps2` DOUBLE

) CLUSTERED BY (

unique_gal_id) 

INTO 4 BUCKETS ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'


INSERT OVERWRITE TABLE cosmohub.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_c SELECT * FROM jcarrete.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_pq

ANALYZE TABLE cosmohub.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_c COMPUTE STATISTICS;

ANALYZE TABLE cosmohub.scattZ_sof_mice_Feb3rd_zbin1_maxmag22_5_c COMPUTE STATISTICS WITH COLUMNS;