# .CSV import and export

Source: https://amplitude.com/docs/data/csv-import-export

---

On this page

- [Events and event properties](#events-and-event-properties)
- [Events and event properties file schema](#events-and-event-properties-file-schema)
- [Additional fields .CSV export of events and event properties](#additional-fields-csv-export-of-events-and-event-properties)
- [User properties](#user-properties)
- [User properties file schema](#user-properties-file-schema)
- [Additional fields in .CSV export of user properties](#additional-fields-in-csv-export-of-user-properties)
- [Common questions](#common-questions)
- [Export options for raw chart or event data](#export-options-for-raw-chart-or-event-data)
- [How does Amplitude determine the structure of the .CSV file when exporting from an Event Segmentation chart?](#how-does-amplitude-determine-the-structure-of-the-csv-file-when-exporting-from-an-event-segmentation-chart)
- [The .CSV file isn't showing all the possible values of the user/event property — why?](#the-csv-file-isnt-showing-all-the-possible-values-of-the-userevent-property-why)
- [Why is the value of a user property different between the chart and the .CSV export?](#why-is-the-value-of-a-user-property-different-between-the-chart-and-the-csv-export)
- [Why are there leading spaces (tabs) in my exported .CSV file?](#why-are-there-leading-spaces-tabs-in-my-exported-csv-file)

# .CSV import and export

In Amplitude Data, you can view and manage event types, event properties, and user properties piece by piece, but you may want to see a holistic view of your entire tracking plan's schema and make bulk changes to the schema instead.

Amplitude lets you import and export your schema with .CSV to plan new events and properties, edit categories and descriptions, and generate bulk changes.

This article covers the differences between using import and export for events and event properties versus user properties.

## Events and event properties

Follow the below steps to import or export events and event properties:

1. Navigate to Data, and click *Events* under your tracking plan in the left side pane.

2. If you wish to import, click the import icon to open the import modal.

3. If your import file is ready to upload and follows the [expected schema for events and event properties](#events-and-event-properties-file-schema), you can drop your .CSV file or click *Upload* and choose the file from your desired location. If not, click *template* to download a template .CSV to update for importing.

   The imported events and event properties appear in a branch named *import*.

4. Once you’re sure the imported tracking plan updates are correct, you can [merge the changes back into the main branch](/docs/data/data-planning-workflow).

5. If you want to export events and event properties from your tracking plan, click the export icon instead.

6. In the export modal that appears, choose whether to download your tracking plan’s schema or a .CSV file template. Then, click *Download*.

Downloaded .CSV files of your tracking plan contain additional fields not required for import. The next section defines the events and event properties .CSV import file structure and the [additional columns seen in the exported file](#events-and-event-properties-file-schema).

The import and export features don't support custom events, transformations, nor default Amplitude entities.

## Events and event properties file schema

The events and event properties .CSV file requires a specific schema for a successful import. The table below highlights the required schema by entity type. There are some things to note:

- The file's header must contain all listed fields.
- The fields can be in any order, but their names and values must be exact in spelling and capitalization to ensure a successful import process.
- Some fields require a value depending on entity type, as indicated in the following list.

**Action**

- Definition: Action to perform on a particular entity

- Values:

  - `Ignore`: No changes made to the entity nor its subproperties
  - `Remove`: Event and property groups can be removed from the tracking plan. The remove value doesn't affect individual properties. Removing an event or property group disassociates related properties, and changes a live property’s status to unexpected. The remove value doesn't delete an entity, nor does it stop ingestion.
  - `<blank>`: Creates or updates an entity and it’s associated sub-entities

- For events, event properties, property groups property group properties

**Array min items**

- Definition: Minimum number of items for a property with an array property value type
- For event properties and property group properties

**Array max items**

- Definition: Maximum number of items for a property with an array property value type

**Array unique items**

- Definition: Denotes if an array property value type has unique items

  - `TRUE`: Array has unique items
  - `<any>`: Assumes array doesn't have unique items

**Const value**

- Definition: Const value for properties with a const property value type

**Enum values**

- Definition: Enum values for properties with an enum property value type
- Format: Separate each enum value with a comma

**Event activity**

- Definition: Description of an event’s activity

  - `Active`
  - `Inactive`. Marking an event as inactive applies retroactively and immediately, and excludes the event from the `Any Active Event` metric.

- For events

**Event hidden from dropdowns**

- Definition: Set event visibility in dropdowns

  - `True`: Event is hidden in event dropdowns
  - `False`: Event is visible in event dropdowns
  - `<blank>`: Retains the current value

**Event hidden from persona results**

- Definition: Set event visibility in persona results

  - `True`: Event is hidden from persona results
  - `False`: Event is visible in persona results

**Event hidden from pathfinder**

- Definition: Set event visibility in pathfinder

  - `True`: Event is hidden from pathfinder
  - `False`: Event is visible in pathfinder

**Event hidden from timeline**

- Definition: Set event visibility in timeline

  - `True`: Event is hidden from timelines
  - `False`: Event is visible in timelines

**Event category**

- Definition: Category of an event

**Event display name**

- Definition: Only applicable to optional display names of events

**Event property name**

- Definition: Name of the property
- Required for event properties and property group properties

**Event source**

- Definition: Sources associated with the event

**Number property value min**

- Definition: Minimum value of a property with number property value type

**Number property value max**

- Definition: Maximum value of a property with number property value type

**Number is integer**

- Definition: Denotes if a property with number property value type is an integer

  - `True`: Property is an integer
  - `False` or `<blank>`: Property isn't an integer

**Object type**

- Definition: Entity type

  - `Event`
  - `Property Group`

- **Required** for events and property groups

**Object name**

- Definition: Name of the event or property group

**Object owner**

- Definition: Owner of the event or property group
- Leaving this as `<blank>` removes the owner if one exists on the event or property group

**Object description**

- Definition: Description of the entity
- For events and property groups

**Property type**

- Definition: Type of property associated with the event

  - `Event Property`
  - `Event Property Group`

- **Required** for events

**Property group names**

- Definition: Property group that's associated with the event

**Property description**

- Definition: Description of the property

**Property value type**

- Definition: The value type of an event property or property group property

  - `string`
  - `number`
  - `boolean`
  - `any`
  - `enum`
  - `const`

**Property required**

- Definition: Denotes the required status of the property

  - `True`: Property is required
  - `False` or `<blank>`: Property is optional

**Property visibility**

- Definition: Set property visibility in charts

  - `VISIBLE`: Property is visible in charts
  - `HIDDEN`: Property is hidden in charts

- For event properties only

**Property is array**

- Definition: Denotes if the property is an array

  - `True`: Property is an array
  - `False` or `<blank>`: Property isn't an array

**Property regex**

- Definition: Regular expression (Regex) values for properties with a string property value type

**String property value min length**

- Definition: Minimum length of a property with string property value type

**String property value max length**

- Definition: Maximum length of a property with string property value type

**Tags**

- Definition: Tags associated with an event
- Format: separate each tag with a comma

### Additional fields .CSV export of events and event properties

The following list includes additional fields found in the .CSV export of your tracking plan’s events and event properties.

- Definition: The default action to perform on a particular entity. This field exists in the import template, but the downloaded file includes default values.

  - `Ignore`: The user property is unexpected, blocked or deleted.
  - `<blank>`: The user property is planned or live.

**Event first seen**

- Definition: The date on which the event was first seen.
- Format: `mm/dd/yyyy`

**Event last seen**

- Definition: The date on which the event was last seen.

**Property first seen**

- Definition: The date on which the property was first seen.
- For property groups

**Property last seen**

- Definition: The date on which the property was last seen.

## User properties

Follow the below steps to import or export user properties:

1. Navigate to Data, and click *Properties* under *Tracking Plan* in the left side pane. Then click *User Properties*.
2. Click the import icon to open the import modal.
3. If your import file is ready to upload and follows the [expected user properties schema](#user-properties-file-schema), you can drop your .CSV file or click Upload and choose the file from your desired location. If not, click *template* to download a template .CSV to update for importing.

5. If you want to export user properties from your tracking plan, click the export icon instead.
6. In the export modal that appears, choose whether to download your tracking plan’s schema or a .CSV file template. Then, click Download.

The next section defines the user properties .CSV import file structure and the [additional columns seen in the user properties export](#user-properties-file-schema).

## User properties file schema

The list below highlights the required schema for the user properties .CSV file import. There are some things to note:

- Some fields require a value as indicated in the following list.

- Definition: Action to perform on a particular user property

  - `Ignore`: No changes will be made to the user property.
  - `Remove`: The user property is removed from the tracking plan. The removed value doesn't delete a user property, nor does it stop its ingestion.
  - `<blank>`: Creates the user property if it did not already exist; or updates the user property if it did exist.

- Definition: User property type
- Values: User property **(required)**

**Property name**

- Definition: Name of the user property
- This value is **required**

- Definition: Description of the user property

- Definition: The value type of a user property

### Additional fields in .CSV export of user properties

The following list includes additional fields found in the .CSV export of your tracking plan’s user properties.

- Definition: The default action to perform on a particular entity. This field exists in the import template, but the downloaded file will automatically include default values.

## Common questions

### Export options for raw chart or event data

These questions all have the same answer:

- How do I export raw data for a chart or event?
- Can I export the raw event data for the events included in this chart instead of the chart results?
- How do I export a .CSV of all occurrences of a specific event?
- How do I see the data that was pulled into this chart?
- Can I see event and user property values for every instance of this event in the last 30 days?

There's currently no way to export selected raw data for a chart or all data for selected events. Amplitude was built to perform large-scale, complex analyses inside the application, so isolating and exporting event data in a SQL-like manner isn't supported. A few alternatives:

- **Export API** — to export all values of an event and its event properties, use Amplitude's [Export API](/docs/apis/analytics/export). It exports **all** events across a specified time range and returns them in JSON format. From there you can extract the specific events you want. If your data exceeds the Export API size limit, use Amazon S3 Export instead.
- **Amazon S3 Export** — integrate Amplitude with Amazon S3 to export your event data to an S3 bucket. This integration is available on all accounts, including the free plan. See [Amazon S3 Export](/docs/data/destination-catalog/amazon-s3).

### How does Amplitude determine the structure of the .CSV file when exporting from an Event Segmentation chart?

Amplitude uses the breakdown data table as a guide when creating the .CSV. The format and structure of the table is mirrored in the .CSV.

### The .CSV file isn't showing all the possible values of the user/event property — why?

There are limits on the number of values that appear in a .CSV. The limits differ from chart to chart. See [Limits and quotas](/docs/faq/limits-and-quotas#csv-download-limits).

### Why is the value of a user property different between the chart and the .CSV export?

When you download users from the chart via Microscope, the .CSV contains the most recent property values for the user. The chart returns the property value *at the time of the event*.

The same applies when the .CSV has property values that are listed as "none" in the chart — the .CSV shows the most recent value, while the chart shows the value at the time of the event.

### Why are there leading spaces (tabs) in my exported .CSV file?

By default, leading empty spaces can appear in the cells of an exported .CSV. To change the default:

1. Go to **Personal settings**.
2. Go to **Profile**.
3. Enable **Always Remove Leading Spaces from Export** under **Site Settings**.

See [Manage your settings](/docs/admin/account-management/account-settings) for more.

Was this helpful?

<!--$-->

<!--/$-->
