New to Dataiku DSS? Try out our NEW Quick Start Programs today and get onboarded on the product in just one hour! Let's go

Dynamic date filter

Solved!
emate
Neuron
Neuron
Dynamic date filter

Hi All,

Is there a way to set up a dynamic filter, what I mean by that is, I am connecting my DB to DSS flow, and in my DB I have a data starting from 2014, is there a way to set up a filter that I won't need to update manually for getting only last 24 months from the max date I currently have in my DB?

 

Thanks,

 

1 Solution
AshleyW
Dataiker
Dataiker

Hi,

If I’ve understood what you’re trying to do (I'm assuming you already have the data in DSS, among other things...), there’s a few ways you might accomplish this. One way would be to group the dataset to get the max_date, and then to join that resulting max_date back onto every row of the starting dataset. You can then 'filter using formula' in the filter recipe, or use a combination of processor/formulas—diff() will be handy—in the Prepare that will check if the date field you want to filter on is within 24 month of the max_date. When you re-build the datasets in the Flow, the filter will apply the date filter relative to the max_date you generated earlier.

LMK if that helps!

Cheers,
Ashley

View solution in original post

2 Replies
AshleyW
Dataiker
Dataiker

Hi,

If I’ve understood what you’re trying to do (I'm assuming you already have the data in DSS, among other things...), there’s a few ways you might accomplish this. One way would be to group the dataset to get the max_date, and then to join that resulting max_date back onto every row of the starting dataset. You can then 'filter using formula' in the filter recipe, or use a combination of processor/formulas—diff() will be handy—in the Prepare that will check if the date field you want to filter on is within 24 month of the max_date. When you re-build the datasets in the Flow, the filter will apply the date filter relative to the max_date you generated earlier.

LMK if that helps!

Cheers,
Ashley

View solution in original post

emate
Neuron
Neuron
Author

Yes, thank you, you are totally right.

A banner prompting to get Dataiku DSS