# Performing Look Ups

## Overview

Performing a lookup typically involves searching for a specific piece of information within a larger set of data or databases.  In Osmos, once you have created your Dataset(s) and have added at least one Table, you are ready to perform a look-up.&#x20;

A Lookup is created in the data transformation phase and is managed through a [QuickFix](https://docs.osmos.io/data-transformations/quickfixes)

## Pre-Requisites to Create a Lookup

1. Create a [Dataset](https://docs.osmos.io/datasets/getting-started)

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FRLkuKFuDGiBQXuJRepmu%2FCleanShot%202023-05-25%20at%2013.42.24.png?alt=media&#x26;token=2717de55-7d7c-4686-a53e-dd0a36af035f" alt=""><figcaption></figcaption></figure>

2. Create a Table to hold the lookup data.   At least two fields are required, the match field and the desired look-up field.

Note:  A primary or foreign key on the Table is not required to leverage Lookups.

2. Upload the lookup data to the newly created Table

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FryOlRFtHD0amvyqULZDE%2FCleanShot%202023-05-25%20at%2013.42.36.png?alt=media&#x26;token=5cff0403-456e-4e05-9a09-7e38fc0bf20b" alt=""><figcaption></figcaption></figure>

## How to create a Lookup

#### Step 1: Map the Source *Match* Field to the Destination Column

1. In the column mapping, map the Source field, *match field*, to the desired look-up Destination Column field.  The match field is required in the source field to trigger the Datasets Lookup QuickFix

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2F4wJWf1gF4dWLhR0nN1La%2FCleanShot%202023-05-25%20at%2013.46.54%402x.png?alt=media&#x26;token=f9a5c1c0-fd08-45fc-9347-6a6151f05ebb" alt=""><figcaption></figcaption></figure>

#### Step 2: Create the Lookup

1. Once the column is mapped, go to QuickFixes, select **Datasets Lookup.**

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FLUzurW7IlGlmuRXCZlj4%2FCleanShot%202023-05-25%20at%2013.47.22%402x.png?alt=media&#x26;token=3f5f4ce6-9cc3-4227-9c94-098a59a69c75" alt="" width="375"><figcaption></figcaption></figure>

1. **Configure the Lookup**:
   1. Select the **Dataset:**  Select the Dataset where the lookup field is located
   2. Select the **Table**: Select the Table where the lookup field is located
   3. Select the **Lookup Field:**  Select the field you are looking up and wish to be populated in the destination column.&#x20;
   4. Select the **Matcher Fields**: Select the field you are matching between the source field and the mapping table.  The field name will be the same as the Destination column name with the Lookup.
   5. Hit Submit

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2F8NGMjgLgxplJEPEBVbf7%2FCleanShot%202023-05-25%20at%2013.48.52%402x.png?alt=media&#x26;token=9a3156c7-5e82-46de-8f60-e939545f91cd" alt="" width="307"><figcaption></figcaption></figure>

The Destination column will be updated with the desired Looked-up field data.

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FqsVsqNooluwNaRfkVZjd%2FCleanShot%202023-05-25%20at%2014.07.36%402x.png?alt=media&#x26;token=e1558b85-54cc-4fa2-9422-a83fde177b3c" alt=""><figcaption><p>Data Transformation with the Lookup Completed</p></figcaption></figure>

<figure><img src="https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FFt1RXzTTU4JYsLA4ga5Y%2FCleanShot%202023-05-25%20at%2013.49.46%402x.png?alt=media&#x26;token=55aa4d65-662a-405b-87de-fdd76d1173db" alt=""><figcaption><p>Post Data Transformation Data Review</p></figcaption></figure>

<br>
