The Dataiku Frontrunner Awards have just launched to recognize your achievements! Submit Your Entry

Visual recipe 102 : how window frame in window recipe works ?

Solved!
Charly
Level 1
Visual recipe 102 : how window frame in window recipe works ?

Hi all !

I'm currently working to pass the advanced designer certificate and I wanted to confirm something on the window recipe. In the hands-on, we are told :

"Using a Window frame allows you to limit the number of rows taken into account to compute aggregations. Once activated, Dataiku DSS displays two options: Limit the number of preceding/following rows and Limit window on a value range from the order column.

  • Select the first option, Limit the number of preceding/following rows, and select Limit following rows.

We want the computed aggregations to take into account the prior transactions, and not the following ones. For example, if we were to compute the sum of all purchase amounts by card_id, and look at a transaction made on “2017-02-06”, the sum would only reflect purchases made up to that point."

However, we must first order the date column in descending order. When the window frame operate on "following rows", I've got the impression it doesn't infer on the meaning of the order key and then, in this example, it will create the contrary of what is described (the following rows are in the past, not the future). I have tested it and I think I'm right on this...

Is it a typo on the tutorial or is the window frame not working as intended in DSS ? Or have I made a mistake ?

Thanks !

PS : Sorry for my english, I'm not a native speaker ^^'

0 Kudos
1 Solution
NancyK
Dataiker
Dataiker

Hi @Charly! You are correct, because we have ordered the transactions by purchase date in descending order, the effect of the Window Frame the way it's currently set up is indeed the opposite of what is described as the desired outcome in the tutorial (it's only taking into account future transactions and not the past ones).

Thanks a lot for spotting this error! We'll edit and update the Academy lesson asap 🙂 

Best,

Nancy 

View solution in original post

1 Reply
NancyK
Dataiker
Dataiker

Hi @Charly! You are correct, because we have ordered the transactions by purchase date in descending order, the effect of the Window Frame the way it's currently set up is indeed the opposite of what is described as the desired outcome in the tutorial (it's only taking into account future transactions and not the past ones).

Thanks a lot for spotting this error! We'll edit and update the Academy lesson asap 🙂 

Best,

Nancy 

View solution in original post