> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/guides/working-with-the-import-api-v2/import-commands/importing-mappings.md).

# Importing mappings

## Command structure

```json
[
  {
    "resourceType": "Mapping",
    "identifier": {
      "externalSystemId": "EXT_SYSTEM",
      "externalEntityId": "EXT_TABLE > EXT_COLUMN_ABC"
    },
    "asset": {
      "name": "Technical Asset 1",
      "domain": {
        "name": "Technical Domain 1",
        "community": {
          "name": "Technical Community"
        }
      }
    },
    "externalEntityUrl": "https://www.example.com",
    "lastSyncDate": "1509631247",
    "syncAction": "ADD",
    "description": "This is a sample mapping"
  }
]
```

## Identifier

The identifier for a mapping may contain any of the following fields:

* `id`
* `externalSystemId` and `externalEntityId` or `dgcId` or `asset` or `domain` or `community`

{% hint style="info" %}

* The `asset`, `community` and `domain` fields have the same structure and requirements as the asset, community and domain identifiers.
  {% endhint %}

### Identifier structure

```json
{
  "id": "12345678-1234-1234-1234-123456788765"
}
```

```json
{
  "externalSystemId": "EXT_SYSTEM",
  "externalEntityId": "Domain_1234"
}
```

```json
{
  "dgcId": "43215678-1234-1234-1234-123456788765"
}
```

```json
{
  "community": {
    "name": "Sample Community Name"
  }
}
```

## Optional fields

| Field name        | Field type                       | Remarks                                                                                                                                                                                                                                                                    |
| ----------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| asset             | Same as identifier for asset     | Should only be used for updates.                                                                                                                                                                                                                                           |
| community         | Same as identifier for community | Should only be used for updates.                                                                                                                                                                                                                                           |
| description       | String                           |                                                                                                                                                                                                                                                                            |
| dgcId             | String (UUID)                    | Should only be used for updates.                                                                                                                                                                                                                                           |
| domain            | Same as identifier for domain    | Should only be used for updates.                                                                                                                                                                                                                                           |
| externalEntityUrl | String                           |                                                                                                                                                                                                                                                                            |
| externalEntityId  | String                           | Should only be used for updates.                                                                                                                                                                                                                                           |
| externalSystemId  | String                           | Should only be used for updates.                                                                                                                                                                                                                                           |
| lastSyncDate      | Long                             | The default value is the start date of the import/synchronization process.                                                                                                                                                                                                 |
| syncAction        | `ADD` or `UPDATE` or `REMOVE`    | <p>The default values are:</p><ul><li>ADD for new mappings.</li><li>UPDATE for updated mappings</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This field is deprecated and will be dropped in a future release.</p></div> |

## Expected behavior

The behavior is similar to the commands for communities and domains.

## Add operation

If the mapping needs to be created, the following fields have to be provided in order to import successfully:

* `externalSystemId`
* `externalEntityId`

## A note on mappings

When you manually delete a resource that is referenced by a mapping, the mapping is not also deleted. Only the reference to the deleted resource in the mapping is removed. This helps external systems detect that Collibra used to store resources that are now deleted. The external systems can then decide to take appropriate action.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://developer.collibra.com/api/guides/working-with-the-import-api-v2/import-commands/importing-mappings.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.
