Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm building a flag with a script that will compare the previous record to the current and flag differences. My current script is in the form of:
LOAD *, If(Previous(B) = B, 0, 1) as flag;
LOAD *
Order By C;
LOAD A, B, {expression} as C
RESIDENT Data;
You'll likely suggest I put the Order By within the bottom LOAD, but the multiple preceding LOADs are actually more complicated than what's represented here. For this discussion, I'd like to know if I can get the above to work.
The error states I'm missing a "FROM" syntax, suggesting you need a FROM for the Order By to work.
I believe you cannot use an order by in a preceding load. I believe you will need to handle it with a second load, either creating a new table or doing a left join on the key. So first create field C, then do another load resident.
I believe you cannot use an order by in a preceding load. I believe you will need to handle it with a second load, either creating a new table or doing a left join on the key. So first create field C, then do another load resident.
I'm thinking it's not possible either. I ended up creating a new table to deal with this. I was afraid that it would add load time or memory usage, but it doesn't seem to be the case even working with several million records.
I'm thinking it's not possible either. I ended up creating a new table to deal with this. I was afraid that it would add load time or memory usage, but it doesn't seem to be the case even working with several million records.