> For the complete documentation index, see [llms.txt](https://docs.zingg.ai/zingg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zingg.ai/zingg/running-zingg/lookup-data.md).

# Lookup Data

Look up specific records in your match output to find which entity cluster they belong to and get their Zingg ID.

{% hint style="info" icon="right-long" %}
**Enterprise** only. The lookup feature assigns a Zingg ID to given lookup records by finding which entity cluster they belong to in the existing match output.
{% endhint %}

After running the match phase, you sometimes need to look up specific records to determine which entity cluster they belong to. The lookup feature handles this; for given lookup records, it assigns the Zingg ID that describes which entity cluster each record belongs to.

This is useful for operational post-match queries: looking up a new customer record to see if it already exists in your resolved entity graph or checking which cluster a specific record resolves to without re-running the full match.

### Run the lookup phase

```bash
./scripts/zingg.sh \
  --phase runLookup \
  --conf <location to lookupConf.json>
```

### `lookupConf.json` structure

```json
{
  "config" : "config.json",
             "lookupData"
      : [ {"name" : "lookup-test-data", "format" : "inMemory"} ],
        "lookupOutput" : [ {
          "name" : "lookup-output",
          "format" : "csv",
          "props" : {
            "path" : "/tmp/zinggOutput/lookup",
            "delimiter" : ",",
            "header" : true
          }
        } ]
}
```

<details>

<summary><strong>What do the lookupConf.json fields mean?</strong></summary>

* **`config`**\
  Points to your base config.json - the same configuration file used for your match phase. Zingg uses this information to understand your field definitions and model location.
* **`lookupData`**\
  The records you want to look up are available here. The format "`inMemory`" means the lookup records are provided directly in memory rather than from a file. Replace with a file-based pipe config if your lookup records are in a CSV or other format.
* **`lookupOutput`**\
  Where Zingg writes the lookup results. Each lookup record in the output will have its assigned Zingg ID showing which entity cluster it belongs to.

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zingg.ai/zingg/running-zingg/lookup-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
