---------------------------------------------------------------------------------------
------------------------------------------------------ DESPLIEGUE CAMPAÑAS FROM MARKET
---------------------------------------------------------------------------------------
DROP TABLE IF EXISTS d_mdl_vpc_disc.HM_DESPLIEGUE_CAMPANIAS
-- No correr si ya se lee bien la data
CREATE EXTERNAL TABLE d_mdl_vpc_disc.HM_DESPLIEGUE_CAMPANIAS
(
`periodo_campania` string,
`producto` string,
`subproducto` string,
`tipo_carga` string,
`tipo_producto` string,
`num_doc` string,
`num_ruc` string,
`oferta` string,
`plazo` string,
`tasa` float,
`tasa_piso` float,
`bucket` string,
`canal_tlv` string,
`celular1` string,
`celular2` string,
`telefono1` string,
`telefono2` string,
`celular_cne` string,
`celular_cne_2` string,
`celular_cne_3` string,
`celular_cne_4` string,
`celular_cne_5` string
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|'
STORED AS TEXTFILE
LOCATION 's3://sagemaker-us-east-1-058528764918/vpc/aceptacion/market/DESPLIEGUE_CAMPANIAS/'
TBLPROPERTIES (
'skip.header.line.count'='1',
'has_encrypted_data'='false'
);
Add a code snippet to your website: www.paste.org