Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Plain Text by registered user vvillacorta ( 5 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: