Weights Data import for animal information

Hello, we are loading data from a weighing session into our pig data about our heard. It will not let us upload the weight data with a csv. We are having to go through multiple tabs in order to type in the weight. Is there anyway it can be done differently? It has taken us hours to fill in the data for 300 pigs and feels like there is a better way to do it. Also the weight data is not showing on the main page under animals which might be why the data cannot be uploaded as csv. !

Hi @maisie1 - welcome to the farmOS forum!

Weight measurements are recorded as Observation logs. So in order to import via CSV it needs to be done via the Observation log importer: [your-farmos-hostname]/import/log_farm_observation

One way to make this easier moving forward is to create a custom template CSV file that you use to import weights via that form. Try this:

  1. Go to that page and click “Download a template”
  2. Open the template CSV in a spreadsheet application like Excel or LibreCalc.
  3. You only need the following columns:
    • Done (always set this to “y” to indicate that it is done)
    • Date (leave this blank - you will fill this in with the actual date the measurement was taken)
    • Log name (set this to “Weight” or some other standard title for the logs)
    • Asset IDs OR Asset Names (you can either reference the animals by their name or their “Asset ID” in farmOS - this must be an exact match for it to work)
    • Quantity measure (always set this to “weight”)
    • Quantity value (leave this blank for your template, and fill it in with the weight of the animal when you are ready to import)
    • Quantity unit (always set this to “lbs”)

Save this template as a CSV file somewhere on your computer (make sure to save it as CSV, NOT as an XLS or other spreadsheet format).

Then, when you are ready to import weights, copy the template to a new file, fill in the rows and columns with the info for that weighing, and import it via the Observation importer (Logs > Observations > Import observations).

I would highly recommend testing this out with one or two records before you do a big import!

Hope that helps!

thanks so much for your help.
I am still running into a little bit of trouble.

it shows me this!

1 Like

and this is what my csv file looks like

1 Like

i tried to use a different computer with number and now this is what the csv looks like but i am getting the same error message

1 Like

You’re almost there! Two things:

  1. The “headers” need to be the first line of the CSV. In yours they are the last line.
  2. The “Date” column must have a value for the import to work. This is what says “this observation took place on this date”. It can be in just about any format, but I’d recommend yyyy-mm-dd