# 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/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/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"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://olddocs.exivity.io/data-pipelines/transform/language/update_service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
