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

Commit

Permalink
Updated lookup-table.md with CSV format requirements (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kramarev authored Sep 19, 2023
1 parent c2f00b6 commit 167fa8f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
9 changes: 8 additions & 1 deletion docs/analytics/apis/lookup-tables-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ You can also create and manage lookup tables from the Amplitude web app. See [Lo

## Considerations

The max file size is 100 MB and the file can't have more than 1,000,000 rows.
The CSV file must comply with the following requirements:

- The max file size is 100 MB and the file can't have more than 1,000,000 rows.
- The first row must contain column names/headers.
- The first column must correspond to the mapping property value and must contain *unique* values. Lookup Tables search 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 `""`.

## Create a Lookup Table

Expand Down
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 must contain column names/headers.
- The first column must correspond to the mapping property value and must contain *unique* values. Lookup Tables search 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 creates 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.

| 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)

0 comments on commit 167fa8f

Please sign in to comment.