Batch and stream data