Yesterday we talked about exporting data using the Views data export module.
Drupal 7 – Export view data CSV, XML, XLS by Views data export module
The module also provides a Drush command such that you can run the export command in the server which is convenient for backend integration.
The following command is stated in the project page.
- drush views-data-export [view-name] [display-id] [output-file]
But actually the command doesn’t work as expected. For example, the following command will not create the output.csv. Instead, it will print the csv in stdout.
- drush views-data-export node_export views_data_export_1 output.csv
So if u really want to create the output.csv, you have to feed to stdout to a new file. For example.
- drush views-data-export node_export views_data_export_1 output > output.csv