Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to resolve this issue in load script.
For every ID and Task I have WorkFlow Id (min Start Date), but I need the same Workflow Id for all next empty values.
I have tried Previous and Peek function but without success.
Any help?
Thanks.
T.
try this
Data:
LOAD
ID,
Task,
[Start Date],
[End Date],
[Workflow Id]
FROM Source;
Final:
noconcatenate
LOAD *,
if(len(trim([Workflow Id]))=0,peek([Workflow ID]),[Workflow Id]) as [Workflow ID]
Resident Data
order by ID,Task,[Start Date];
drop table Data;
Can you share sample instead of image. Or look at here Get previous row value when the value is null
Something like:
LOAD
ID,
Task,
[Start Date],
[End Date],
If(Len([Workflow Id]) = 0, Peek([Workflow Id]), [Workflow Id]) as [Workflow Id]
FROM ....
Have not tested this as you pasted your sample data as an image.
try this
Data:
LOAD
ID,
Task,
[Start Date],
[End Date],
[Workflow Id]
FROM Source;
Final:
noconcatenate
LOAD *,
if(len(trim([Workflow Id]))=0,peek([Workflow ID]),[Workflow Id]) as [Workflow ID]
Resident Data
order by ID,Task,[Start Date];
drop table Data;