Problem/Motivation
There are some differences between the format of CSVs exported from farmOS (using the "Export CSV" bulk action added in this PR: https://github.com/farmOS/farmOS/pull/783) and the format of CSVs that can be imported into farmOS (using the default CSV importers added to farmOS v2 by #3382539: farmOS v2 CSV import module).
This makes it difficult to use the CSV export/import to move data from one farmOS to another.
Steps to reproduce
Export a CSV of assets from farmOS and try to re-import it.
Proposed resolution
Use this issue to document that differences and think through next steps that might bring the two formats closer to compatibility with one another.
Remaining tasks
TBD
Old issue summary (from farmOS v1)
There are some major differences between the format of CSVs exported from farmOS and the format of CSVs that can be imported into farmOS. This makes it difficult to use the CSV export/import to move data from one farmOS to another.
Some of these differences are documented here: http://v1.farmOS.org/guide/export
Due to these differences, it is not recommended to use CSVs for moving data from one farmOS to another.
We may be able to improve upon this...
One thing we can do is override the fields provided by the CSV exports, and differentiate them from the output that is displayed in the View's Page display. Some examples:
* Do not truncate description fields
* Output numerical asset IDs (instead of names)
* ...
Comments
Comment #2
m.stentaBumping this to 2.x. We will need to review and update the issue description...
Comment #3
m.stentaI'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.
Comment #4
m.stentaUpdate: 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
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...
Comment #5
m.stentaComment #6
m.stentaComment #7
m.stentaComment #8
m.stentafarmOS 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:
Comment #9
m.stenta