# Using Suitcase to add and update observations?

**URL:** <https://forum.odk-x.org/t/using-suitcase-to-add-and-update-observations/301>\
**Category:** Support\
**Created:** [April 7, 2018, 4:57pm UTC](https://forum.odk-x.org/t/using-suitcase-to-add-and-update-observations/301 "2018-04-07T16:57:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![linl33](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@linl33](https://forum.odk-x.org/u/linl33)\
**Post date:** [April 9, 2018, 6:04am UTC](https://forum.odk-x.org/t/using-suitcase-to-add-and-update-observations/301/3 "2018-04-09T06:04:54Z")

</div>

Hi Caroline,

The option for uploading data using Suitcase is `update`. This feature is only available from the command line.

To use the update function of Suitcase, invoke the Suitcase jar with the `-update` switch.  
For example,  
If I have the following server configuration

| | |
| --- | --- |
| Server Address | [https://odk.example.com](https://odk.example.com) |
| App Id | default |
| Username | admin |
| Password | mySecurePassword123 |

And I want to update the table with table id `household` using data stored in a CSV located at `/home/user/household_april.csv`.

I would use the following command:

```sh
java -jar 'ODK Suitcase v2.0.3 rev 220.jar' \
  -cloudEndpointUrl 'https://odk.example.com' \
  -appId 'default' \
  -dataVersion 2 \
  -username 'admin' \
  -password 'mySecurePassword123' \
  -update \
  -tableId 'household' \
  -path '/home/user/household_april.csv'

```

The CSV file used for this operation is mostly the same as the one used for data pre-loading on Android, with one small difference.

The first column of the CSV file has to be an `operation` column.  
The valid values for this column are: `FORCE_UPDATE`, `UPDATE`, `NEW` and `DELETE`  
The value in this column instructs Suitcase how to treat that row.

`UPDATE` and `FORCE_UPDATE`  
Both of these options are used for updating data on the server. They update data on the server by matching the `_id`. `FORCE_UPDATE` retries updates that failed with a more aggressive strategy.

`NEW`  
Used for creating new rows.

`DELETE`  
Used for deleting rows. Rows are matched using `_id`.

---

_[View the full topic](https://forum.odk-x.org/t/using-suitcase-to-add-and-update-observations/301)._
