add partition pruning to materialize script . if date not provided will read all partitions