---------------------------------------------------------------------------------------
-------------------------------------------------------- CAMPAÑAS TOTAL FROM MARKET
---------------------------------------------------------------------------------------
DROP TABLE IF EXISTS d_mdl_vpc_disc.HM_CAMPHANAS_TOTAL
-- No correr si ya se lee bien la data
CREATE EXTERNAL TABLE d_mdl_vpc_disc.HM_CAMPHANAS_TOTAL
(
`periodo_campania` string,
`camphana` string,
`subcamphana` string,
`canal` string,
`inicio` string,
`fin` string,
`banca` string,
`tipo_camphana` string,
`num_doc` string,
`num_ruc` string,
`tasa` float,
`flg_activo` integer,
`gestion_tipo` string,
`gestion_subtipo` string,
`id_empresa` integer,
`id_campanha_instancia` integer
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|'
STORED AS TEXTFILE
LOCATION 's3://sagemaker-us-east-1-058528764918/vpc/aceptacion/market/CAMPHANAS_TOTAL/'
TBLPROPERTIES (
'skip.header.line.count'='1',
'has_encrypted_data'='false'
);
Add a code snippet to your website: www.paste.org