Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Now I have a dataset with price and price time.
at load scripts, how can I load the field of price and split it into two fields : current price and future price by time difference?
I know I can do two load flows with concatenate like:
Let vToday=today();
Load
product,
price,
time
From ..... where price < '$(vToday)';
Concatenate
Load
product,
price as future_price
time
From....where price > '$(vToday)';
But is there a way to use like if function to achieve it at one batch of load without using concatenate ?
thanks
Hi there,
Basically you could try this:
Load
product,
If(time > today(), price, 0 ) as 'Future Price,
If( time < today(), price, 0) as 'Current Price',
time
From .....
Hi there,
Basically you could try this:
Load
product,
If(time > today(), price, 0 ) as 'Future Price,
If( time < today(), price, 0) as 'Current Price',
time
From .....