Attached is a small patch file to make the batch export respect the items_per_page value set in the view.
This is useful for when it is running on a server that might timeout due to tight restrictions and/or a complex query.
Currently it is hard coded to export in batches of 100.
This patch allows you to set that as you please, this will obviously slow down your batches, but it does give you the ability to have more confidence they will complete.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ryan.merritt’s picture

Hello chrisns (and anyone else!)

I stumbled upon this post and the patch a few days ago while trying to research how to make the views data export module wholeheartedly respect the items_per_page, similar to a view.

In other words, you can limit the $view->result to only a certain amount of results, with no pagination, yet with this module (attached to a view with exposed filters and their respective values filled out) will export all of the results that match the filters criteria. I cannot figure out how to limit the end result .CSV file and its results to a number that i specify.

Additionally (sorry chrisns!), the patch when I applied it failed (could be my own issue) but I have long since had the source to the module open and just changed it myself.

Anyone with any help would be greatly appreciated! Figured i'd post here first before making any kind of a new issue as this page is as close as it gets to what i'm looking for.

Thanks,
Ryan

Steven Jones’s picture

Status: Active » Needs review

There's a patch here, it needs review!

Steven Jones’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Assigned: Unassigned » Steven Jones
Status: Needs review » Needs work

I think I would rather make this an option in the VDE settings, as you might not even have a pager attached to the view when using a data export display, and we shouldn't require it for a basic option like this.

Also moving to 7.x-3.x and we'll backport from there.

Steven Jones’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Assigned: Steven Jones » Unassigned
Status: Needs work » Patch (to be ported)

I've pushed a fix into 7.x-3.x this needs backport to 6.x-2.x.

Steven Jones’s picture

Title: items_per_page not respected via batch export » Allow segment size of batched export to be controlled
Category: bug » feature
Steven Jones’s picture

Status: Patch (to be ported) » Fixed

Pushed in 6.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.