Made a few changes : a) Added Ken's patch for proper partitioning of data when daily data is produced