# update\_service

## Overview

The `update_service` statement is used to update service descriptions and/or unit labels.

## Syntax

**`update_service`***`service_key`***`[description`***`new_description]`***`[label`***`new_label]`*

**`update_service using file`***`file key_col`***`[description`***`description_col]`***`[label`***`label_col]`*

**`update_service using dset`***`key_col`***`[description`***`description_col]`***`[label`***`label_col]`*

## Details

The `update_service` statement can:

* update a single service using a specific key
* update all services whose keys are present in a DSET or CSV lookup source

### Update a single service

**`update_service`***`service_key`***`[description`***`new_description]`***`[label`***`new_label]`*

The service with a key of *service\_key* is updated with the literal description and label provided.

### Update multiple services using a CSV lookup file

**`update_service using file`***`file key_col`***`[description`***`description_col]`***`[label`***`label_col]`*

{% hint style="info" %}
The *file* parameter may contain a path component and is considered as relative to the home directory.
{% endhint %}

All services keys that match values in the `key_col` column in the CSV called *file* have their descriptions and/or labels updated with the values in the corresponding `description_col` and `label_col` columns in *file*.

### Update multiple services using a DSET

**`update_service using dset`***`key_col`***`[description`***`description_col]`***`[label`***`label_col]`*

To update services using a DSET, it must have been previously [imported](https://olddocs.exivity.io/2.10.2/data-pipelines/transform/language/import) in order to be used as the lookup source.

The DSET ID is derived from the *key\_col* column as follows:

* If [fully qualified](https://olddocs.exivity.io/2.10.2/advanced/digging-deeper/dataset-lifecycle) then the DSET is derived from *key\_col* directly
* If not fully qualified then the default DSET is assumed

In either case, whichever is used, or both, of *description\_col* and *label\_col* must be located in the same DSET as *key\_col*

## Examples

```
# Update all services from CSV file
update_service using file "system/lookup.csv" service_key description service_name label unit

# Update specific service
update_service "Small_VM1" description "Small VM 1" label "VM's"
```
