- πΊπΈUnited States m.stenta
I'm actually going to set this back to 7.x-1.x and close it as "won't fix".
We aren't maintaining 7.x-1.x anymore, and we don't have CSV importers in 2.x (see #3151244: [META] farmOS 2.x Importers β ). If we have the same issue after we add CSV importers, we can open a new issue.
- Status changed to Postponed
11 months ago 3:02pm 26 January 2024 - πΊπΈUnited States m.stenta
Update: We now have CSV importers in farmOS v2+ ( #3382539: farmOS v2 CSV import module β ).
I also just opened a pull request that will make the asset and log CSV exporters more closely aligned with the CSV importers: https://github.com/farmOS/farmOS/pull/783
Regarding CSV export/import compatibility (issue (5) above), this is step in the right direction. It changes the CSV columns headers to be field IDs instead of field labels, which match what the CSV importers expect, and it includes more potential data. It may be worth reopening https://www.drupal.org/project/farm/issues/2900239 β and documenting what all the differences are, so we can consider whether or not we want to continue the effort of bringing them together.
There are still differences that prevent exports from being directly used in imports. Once that PR is merged, we can pick up this issue where we left off and document what all the differences are, and explore next steps to bring the two closer together.
Reopening this issue, updating the summary, and marking it as "postponed" pending that PR...
- Status changed to Active
9 months ago 1:47pm 21 March 2024 - πΊπΈUnited States m.stenta
farmOS 3.1.0 and 3.3.0 changed the way that we generate CSV exports for assets, logs, and quantities (notably data stream exports have not changed, but are not relevant to this issue).
See pull requests:
To summarize, we used to provide CSV exports as View displays with a limited set of columns (the same columns as the page displays). Now, we provide an "Export CSV" bulk action which uses the CSV Serialization β module to create CSV rows for selected entities.
I referenced this issue in the first pull request:
The CSV exports are not compatible with the CSV importers, and we basically decided they never will be (see https://www.drupal.org/project/farm/issues/2900239 β ). This will still be the case after this PR, but it brings us a step closer to supporting this.
Regarding CSV export/import compatibility (issue (5) above), this is step in the right direction. It changes the CSV columns headers to be field IDs instead of field labels, which match what the CSV importers expect, and it includes more potential data. It may be worth reopening https://www.drupal.org/project/farm/issues/2900239 β and documenting what all the differences are, so we can consider whether or not we want to continue the effort of bringing them together.
There are a couple of notable changes between the CSV files that were produced by the old code and this new code:
- CSV headers are field IDs instead of field labels.
- More columns are included.
- Quantity columns are NOT included (see "Next steps" below).
- Timestamp fields are returned in RFC3339 format.
- Multi-value cells use a pipe (|) separator instead of a comma (,).
There may be others... those were the main ones I noticed/worked on personally. We get most of this output "for free" from the Drupal content entity normalizer, as opposed to specifying each one explicitly in Views, so we may find that there are bugs/issues that went unnoticed during my testing which we can address in follow-ups.