Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hei,
I need some help.
How to sort table Oras in this script by Data?
Wunderground:
LOAD
RowNo() as Nr
,@1 as Utena
FROM
[http://api.wunderground.com/api/d9d8ecf8bb9d2e11/yesterday/q/CA/Utena.xml]
(txt, codepage is 1257, no labels, delimiter is ' ', msq);
LET vExA = '';
FOR vR = 0 TO NoOfRows('Wunderground')-1
LET vExA = vExA & Chr(10) & ',' & Chr(39) & Peek('Utena', vR, 'Wunderground') & Chr(39);
NEXT vR
Oras:
LOAD DISTINCT
Date(Today() - 1, 'YYYY.MM.DD') as Data
,Right(Left(Pick(548 $(vExA) ), len(Pick(548 $(vExA) )) - 12), len(left(Pick(548 $(vExA) ), len(Pick(548 $(vExA) )) - 12)) - 11) as Temperatūra
Resident Wunderground;
Left join (Oras)
Load
If(Temperatūra > -4, 'Vasara', 'Žiema') as Sezonas
Resident Oras;
Concatenate (Oras)
LOAD Data
,Temperatūra
,Sezonas
FROM
C:\Users\Mindaugasb\Desktop\VVS\Transportas\Kuro normos\Orai\Temperature.txt
(txt, utf8, embedded labels, delimiter is ',', msq);
STORE Oras INTO C:\Users\Mindaugasb\Desktop\VVS\Transportas\Kuro normos\Orai\Temperature.txt (txt);
This is what Temperature.txt file contains:
Data,Temperatūra,Sezonas
2016.01.07,-19,Žiema
2016.01.01,-10,Žiema
2015.12.31,-12,Žiema
2015.12.30,-9,Žiema
2016.01.03,-17,Žiema
2016.01.05,-17,Žiema
2016.01.04,-12,Žiema
2016.01.02,-15,Žiema
Please give me a piece of advice as I am struggling.
Maybe just use another resident load just before your STORE:
TMPOras:
NOCONCATENATE
LOAD * RESIDENT Oras
ORDER BY Data;
STORE TMPOras INTO ...;
Maybe just use another resident load just before your STORE:
TMPOras:
NOCONCATENATE
LOAD * RESIDENT Oras
ORDER BY Data;
STORE TMPOras INTO ...;