CREATE EXTERNAL TABLE `d_mdl_vpc_disc.HM_NUEVO_MES_AGENDA_CREDITOS_CAMPANIAS`(
  `num_doc` string COMMENT '', 
  `cod_sbs_val` string COMMENT '', 
  `cod_sbs` string COMMENT '', 
  `periodo_val` string COMMENT '', 
  `numruc_val` string COMMENT '', 
  `cod_unico_val` string COMMENT '', 
  `tip_contribuyente_val` string COMMENT '', 
  `tip_persona_val` string COMMENT '', 
  `condicion_domicilio` string COMMENT '', 
  `estado_contribuyente` string COMMENT '', 
  `contabilidad` string COMMENT '', 
  `facturacion` string COMMENT '', 
  `comercio_exterior` string COMMENT '', 
  `estado` string COMMENT '', 
  `ciiu_val` string COMMENT '', 
  `ubigeo_val` string COMMENT '', 
  `num_trabajadores` int COMMENT '', 
  `monto_deuda_tributo_amt` decimal(18,3) COMMENT '', 
  `cnt_deudas_tributarias` int COMMENT '', 
  `cnt_rrll` int COMMENT '', 
  `tiempo_baja` decimal(18,2) COMMENT '', 
  `tiempo_alta` decimal(18,2) COMMENT '', 
  `promedio_edad_rrll` decimal(18,3) COMMENT '', 
  `tenencia_maxima_rrll` int COMMENT '', 
  `banca_fin_val` string COMMENT '', 
  `nro_entidades` int COMMENT '', 
  `rango_ventas` decimal(22,4) COMMENT '', 
  `saldo_coloc_direct_tc` decimal(18,3) COMMENT '', 
  `nroregs_coloc_directas_bcos` int COMMENT '', 
  `porc_coloc_direct_vig_cmpt` decimal(18,3) COMMENT '', 
  `facturacion_prom_ult9m_mnt` double COMMENT '', 
  `deuda_sf_prom_ult9m` double COMMENT '', 
  `tend_facturacion_ult_trim_mnt` double COMMENT '', 
  `tend_facturacion_ult_mes_mnt` double COMMENT '', 
  `tend_deuda_agrar_ult_trim_mnt` double COMMENT '', 
  `tend_deuda_agrar_ult_mes_mnt` double COMMENT '', 
  `tend_deuda_sf_ult_trim_mnt` double COMMENT '', 
  `monto_adquirido_u6_amt` double COMMENT '', 
  `monto_pagado_ult_rcc_amt` double COMMENT '', 
  `monto_pagado_u3_amt` double COMMENT '', 
  `monto_pagado_u6_amt` double COMMENT '', 
  `saldo_coloc_vig_otros_bancos_amt` double COMMENT '', 
  `sow_ibk` double COMMENT '', 
  `sow_otros_bancos` double COMMENT '', 
  `sow_cajas` double COMMENT '', 
  `tendencia_nro_entidades_v2` decimal(18,4) COMMENT '', 
  `tendencia_nro_coloc_direct_bancos_v2` decimal(18,4) COMMENT '', 
  `prom_reactiva_u6m` double COMMENT '', 
  `prom_gar_u12m` double COMMENT '')
PARTITIONED BY ( 
  `p_periodo_v` string COMMENT '')
ROW FORMAT SERDE 
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  's3://sagemaker-us-east-1-058528764918/vpc/propension/athena/HM_NUEVO_MES_AGENDA_CREDITOS_CAMPANIAS/'
TBLPROPERTIES (
  'has_encrypted_data'='false', 
  'parquet.compression'='SNAPPY', 
  'presto_query_id'='20220331_213952_00103_w9qm9')

Add a code snippet to your website: www.paste.org