Manage Data Extensions
In Marketing Cloud Engagement, a data extension is a table that contains data that you provide. Use data extensions to hold customer data, track loyalty points, collect tracking and usage data, and any other use case that requires you to store information in a table.
Required Editions
| Available in: Basic, Pro, Corporate, and Enterprise editions. |
Create a Data Extension
When you create a data extension, you define its attributes, its data retention policies, and the fields it contains.
- In Contact Builder, on the Data Extensions tab, click Create.
- For Creation Method, select Create from New.
-
Specify the properties of the data extension.
- Enter a name and description for the data extension.
-
Enter a unique external key to identify the data extension.
If you don’t specify an external key, Contact Builder creates a unique key for you. You use this key to refer to the data extension in API calls, AMPscript functions, and SSJS functions.
- For Location, choose a folder to store the data extension in.
- To make the data extension eligible for message sends, select Is Sendable.
- To make the data extension eligible for test sends, select Is Testable.
- Click Next.
- To enable the data retention feature, turn on Retention Setting. Otherwise, click Next.
-
If you enabled data retention, configure the retention policy.
-
Specify which records to delete in the data extension at the end of the retention
period.
To delete individual records based on their creation dates without deleting the data extension, select Individual Records.
To the data extension and all its records, select All records and data extensions.
To delete all records in the data extension without deleting the data extension itself, select All records.
-
Specify the time period for the retention policy.
You can select a specific date, or a time period, such as 3 months or 7 days.
- Click Next.
-
Specify which records to delete in the data extension at the end of the retention
period.
-
Configure the fields in the data extension.
- For Name, enter a unique name for the field in the data extension.
- Select the type of data that the field contains.
-
For Length, enter the maximum number of characters that the field can contain.
You can specify a maximum length only for the Text and Decimal data types.
-
To use the value of the field to identify unique records, select Primary
Key.
If you select this option, each item in the data extension must have a unique value for this field. After you create a data extension, you can’t modify the primary key fields. Don’t use a Date column as a primary key.
- To use a default value for the field if none is provided, enter the value in Default Value.
-
To encrypt the contents of the field, select Encrypt Field.
This option is available only for accounts with field-level encryption enabled. For more information about field-level encryption, contact your account executive.
- Repeat these steps for each field that you want to add to the data extension.
- If the data extension is sendable, specify how the data in the data extension is related to subscriber data. Next to Send Relationship, from the left dropdown menu, select a data extension field that corresponds to a subscriber value. Then, from the menu on the right, select whether the field corresponds to the subscriber key or the subscriber ID.
- Click Create.
Copy a Data Extension
Duplicate a data extension by copying it. When you copy a data extension, Contact Builder creates a data extension with the same structure and properties as the original data extension. The new data extension doesn’t contain any of the records from the original data extension.
- In Contact Builder, click Data Extensions.
- Select the data extension to copy.
-
Click the Duplicate icon (
) in the data extension window.
- Enter a name and a description for the new data extension.
- Enter the external key for the new data extension in the External Key field. This value must be unique.
-
To place the new data extension in a different folder, click Change
Location and select the new location.
If you don’t select a location, Contact Builder creates the data extension in the same location as the original data extension.
- Save the data extension.
Export a Data Extension
To create a data backup or load data into an external application, export a data extension to a file.
- In Contact Builder, click Data Extensions.
- Select the data extension to export.
- Click Export.
- Enter a file name for the export file.
- Select a format for the export file.
-
Choose your export options.
-
Choose whether to download the file directly or place it in an FTP location.
If the export file is 20 MB or larger, you must use FTP.
- To receive notification when the export completes, enter an email address.
-
Choose whether to download the file directly or place it in an FTP location.
- Click Export.
Move a Data Extension
To keep your data extensions organized, you can move them to folders. You can also use folders for access control—configure folder-level permissions that restrict access to specific users and teams.
- In Contact Builder, click Data Extensions.
- Select the data extension to move.
- Click Change Location.
- Select the new location for the data extension.
- After you select the new location, click Change Location.
Edit a Data Extension
Modify the properties of a data extension, such as its name, external key, or fields.
- In Contact Builder, click Data Extensions.
- Select a data extension to edit.
- Next to the attribute you want to change, click Edit.
- To edit the name or external key for the data extension, enter the new value in the appropriate field.
-
To modify an attribute, click
.
-
To remove an attribute, click
.
- To add an attribute to a data extension, click Create Attribute button.
- Save your changes.
Delete a Data Extension
To remove a data extension and all of its records, you can delete it from Contact Builder. If the data extension has any data relationships, remove them in Data Designer before you try to delete.
- In Contact Builder, click Data Extensions.
- Select the data extension to delete, and then click Delete.
- Review the warning about deleting data extensions.
- Click Delete.
The data extension is moved to the Recycle Bin. You can restore a data extension in the Recycle Bin for up to 30 days after it’s deleted.

