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 ................................T_MERCADO_BPE_ADQ_SF_P04
CREATE TABLE ....................................T_MERCADO_BPE_ADQ_SF_P04
WITH ( format = 'Parquet',
parquet_compression = 'SNAPPY',
partitioned_by = ARRAY['PERIODO'],
external_location= 's3://.........................................................................../T_MERCADO_BPE_ADQ_SF_P04/'
)
AS (
SELECT AA.CODSBS, AA.COD_EMPRESA, coalesce(BB.SALDO_AJUSTADO, 0) SALDO_AJUSTADO, AA.PERIODO
FROM ..................................T_MERCADO_BPE_ADQ_SF_P03_AUTOCOMPLETADO_U9M AA
LEFT JOIN .................................T_MERCADO_BPE_ADQ_SF_P03 BB
ON AA.CODSBS = BB.CODSBS
AND AA.COD_EMPRESA = BB.COD_EMPRESA
AND AA.PERIODO = CAST(BB.PERIODO as varchar)
)
Revise this Paste