Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Updated lookup-table.md with CSV format requirements #976

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions docs/data/sources/lookup-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ You can also create and manage lookup tables via an API. See [Lookup Table API](
To set up this integration, you need the following:

- An event property or user property to create a mapping from.
- A CSV that has the data you want to map to. The first column data must correspond to the mapping property value.
- A CSV that has the data you want to map to:

- The first row should contain column names/headers
- The first column must correspond to the mapping property value and must contain *unique* values. Keep in mind that Lookup Tables are looking for exact matches, and are *case-sensitive*.
- Columns must be separated by commas
- Rows must be separated by line breaks
- If a field value contains commas or quotes, it should be wrapped within double quotation marks. The first double quote signifies the beginning of the column data, and the last double quote marks the end. If the value contains a string with double quotes, these are replaced by two double quotes `""`

### Amplitude setup

1. In Amplitude Data, click **Catalog** and select the **Sources** tab.
2. In the Lookup Tables section, click **CSV**.
3. Upload the CSV then click **Next**.
4. . Map your event property.
4. Map your event property.
5. When you're done mapping, click **Finish**.

## Update a lookup table
Expand Down Expand Up @@ -55,13 +61,13 @@ With Amplitude's Lookup Table feature, you can import your own data and map it t
- **Bulk filter long lists**. You want to see user behavior for a specific region and you have a list of all the customers and their regions. Use this to map each customer to a region, creating a new "Region" property. Now you can filter specifically to each region in a chart.

## CSV example
The following CSV will create a new property called `Language` that maps to the `SKU` property. This CSV is an example implementation of the **Bulk update property values** use case from the previous section.

The following CSV will create a new property called `Language` that maps to the `SKU` property. This CSV is an example implementation of the **Bulk update property values** use case from the previous section.
akramarev marked this conversation as resolved.
Show resolved Hide resolved

| SKU | Language |
|-----------|----------|
| en_US | English |
| fr_FR | French |
| de_DE | German |
| SKU | Language |
| ----- | -------- |
| en_US | English |
| fr_FR | French |
| de_DE | German |

[Click to download this example CSV](../../assets/csv/lookup-table-example.csv)
Loading