Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Plain Text by registered user vvillacorta ( 3 years ago )
DROP TABLE IF EXISTS ............T4_MERCADO_BPE_PRESTAMO_AUTOCOMPLETADO


			CREATE TABLE ............T4_MERCADO_BPE_PRESTAMO_AUTOCOMPLETADO
			WITH ( format = 'Parquet', 
				   parquet_compression = 'SNAPPY', 
				   partitioned_by = ARRAY['PERIODO'], 
				   external_location= 's3://............................................./T4_MERCADO_BPE_PRESTAMO_AUTOCOMPLETADO/'
			)
			AS (
			  
			  SELECT AA.CODSBS, AA.COD_EMPRESA, coalesce(BB.SALDO_AJUSTADO, 0) SALDO_AJUSTADO, AA.PERIODO 
			  FROM ............t3_mercado_bpe_prestamo_tarjeta_autocompletado AA
			  LEFT JOIN ............t3_mercado_bpe_prestamo_tarjeta BB
			  ON AA.CODSBS = BB.CODSBS
				 AND AA.COD_EMPRESA = BB.COD_EMPRESA
				 AND AA.PERIODO = CAST(BB.PERIODO as varchar)
			  
			)

 

Revise this Paste

Your Name: Code Language: