Datameer partition filter expression to specify 2 Months
I need dynamic data partition for my datameer workbook. I need two months of data from today. So if i go to Advance partition filtering and specify something like $partition > TODAY()-60d && $partition <= TODAY() , it isn't getting me full 60 days of data. Couldn't see any examples on how to use MONTH in datameer documentation. Any help is appreciated. I use datameer version 4
-
Official comment
Thanks for the clarification. This behavior is consistent with the design of the partitions. Monthly partitions are tagged for the first of the month (which was longer than 60 days ago) and so it was not included.
For this particular use case, I'd recommend the following Advanced Partition Filter:
$partition >= STARTOFMONTH(ADDTODATE(TODAY();"-2M"))
To break this down, the formula's core starts with the same TODAY() calculation and then uses the ADDTODATE function to go to the date 2 months ago ("-2M"). After this, the STARTOFMONTH function is used to ensure that the first of the month is referenced to align with the partition definition.
Comment actions -
Every second there are 100's of data records, total data was about 26GB, i missed the whole december data when i used the previously mentioned expression from last week's date.
All i want to know is examples of partition filter using MONTH($Partition) . In this case is it best to use MONTH ? or should the previous expressed worked correctly ?
Please sign in to leave a comment.
Comments
4 comments