---
title: "ignore_if_exists()"
component: "gsql-ref"
version: "3.10"
module: "ddl-and-loading"
html_url: "/gsql-ref/3.10/ddl-and-loading/functions/reducer/ignore_if_exists"
canonical_url: "https://www.tigergraph.com/docs/gsql-ref/3.10/ddl-and-loading/functions/reducer/ignore_if_exists"
markdown_url: "https://www.tigergraph.com/docs/gsql-ref/3.10/ddl-and-loading/functions/reducer/ignore_if_exists.md"
---

[View as HTML](https://www.tigergraph.com/docs/gsql-ref/3.10/ddl-and-loading/functions/reducer/ignore_if_exists)

# ignore_if_exists()

This function ensures that vertex attributes retain their values if they have an existing value.

## Acceptable parameter types

Any type.

## Return value

* If there already exists a value for the attribute, return the existing value. This makes sure that the existing value is retained.
* If there isn't an existing attribute value, return the input token.

## Example

If we have the following data in a CSV file of the different scores of test takers, and Tommy and Amy both already have existing scores. We want to load new scores only if the vertex doesn't have an existing score:

| name | score |
| --- | --- |
| Tommy | 95 |
| Tommy | 93 |
| Amy | 94 |
| Amy | 99 |
| Emily | 97 |
| Emily | 92 |

We can write the following `LOAD` statement:

```gsql
LOAD f TO VERTEX Person
  VALUES ($"name", REDUCE(ignore_if_exists($"score"))
```
