Skip to main content

Data Deletion Tool

Last updated 10/03/2026

1. Overview​

The Data Deletion Tool deletes data from the AE system. You can delete event data by time period and event type, or delete all data (including user data). The Meta data of the event table and user table (that is, the table structure) is not deleted. To clear Meta data, we recommend creating a new project and deleting the old one.

Note

We recommend deleting data only to clear test data or abnormal data, not as a routine operation. Use this tool with caution.

2. Instructions​

For version 2.7 and earlier, run ta-data-del to open the Data Deletion Tool

The Data Deletion Tool is available only to users of on-premises deployments. Log in as the root user to the server in the on-premises cluster where the secondary development tools are deployed (by default, the first three servers in a distributed deployment), and run su - ta

Then run ta-tool data_del to open the Data Deletion Tool interface.


2.1 Enter the appid of the project to delete​

You can find the project's appid on the project information card in Project Settings → Settings → Implementation in the AE console, or at the top of the Data → Source → Data Collection Guide page.

2.2 Confirm the project name​

After you enter the appid, the tool shows the name of the project to delete. Enter "y" to confirm or "n" to cancel


2.3 Select the type of data to delete​

Next, select the data to delete. You can delete only event data (that is, data in the event table) or all data (all event table data and all user table data). The following table lists the operations available for each deletion type:

Deletion typeEvent data onlyAll data
Deletes event table√√
Deletes user table√
Time selectable√All time
Events selectable√All events

2.4 Steps for deleting event data​

Next, enter the Event name of the events to delete. The event name here is the key used when transmitting data, not the display name. You can look up event names in Data → Management → Events. To delete multiple events, separate them with ",". After you finish, the tool shows the names of the events to be deleted.

If you press Enter without typing anything, all event data is deleted:


2.5 Enter the time range of event data to delete​

Next, enter the time period of the data to delete. The time granularity is "day". Enter dates in the yyyy-MM-dd format. If you press Enter without typing a date, the first or last day of existing data is used. The following table shows the details (blank means not entered):

Deletion typeStart dateEnd date
Delete data for all time
Delete data from the first day to a specific dateEnter a date
Delete data from a specific date onwardEnter a date
Delete data for a specific periodEnter a dateEnter a date

The following example deletes data for all time:


2.6 Use custom conditions​

If you specify both a start date and an end date for the deletion, an input box for custom conditions appears. This feature lets you use SQL statements to further refine the conditions for the data to delete. The custom condition you enter is used as the WHERE condition of the delete statement. Even if you don't manually specify is not null /is null for a field, the system automatically appends "col" is not null to the final condition.

Custom conditions follow the presto syntax standard. Before deletion, the tool shows an SQL preview of the delete statement and the amount of matching data. We recommend that you first use SQL IDE to query the data you want to delete, then copy the conditions in the WHERE clause into the custom condition here.

Note

Custom conditions don't support subqueries


2.7 Final confirmation​

Before deletion starts, the tool asks for a final confirmation of the project name, the names of the events to delete, and the time period to delete. You need to confirm twice (the second time reminds you again that deleted data can't be recovered). Data deletion starts only after you enter "y" both times. If anything is wrong, enter "n" to exit the tool and enter the information again:


2.8 Steps for deleting all data​

If you choose to delete all data, the tool goes straight to the pre-deletion confirmation. You also need to confirm twice, and data deletion starts only after you enter "y" both times. If anything is wrong, enter "n" to exit the tool and enter the information again:

3. Notes​

3.1 The Data Deletion Tool only deletes data in tables and doesn't delete the following data​

  • Project member data
  • Project information data (project ID and APPID)
  • Used event volume
  • Metadata of events, event properties, and user properties
  • Display names, remarks, and hidden status configured in metadata management, as well as dashboard and report information.

To clear the data above, we recommend creating a new project.

3.2 Make sure no new data arrives for the deletion period while data is being deleted​

Before you use the Data Deletion Tool, make sure no new data arrives for the deletion period (for example, if you delete yesterday's data, no more data for yesterday should arrive during the deletion) so the data is fully deleted. If data for the deletion period arrives during deletion, the data may not be completely deleted.

3.3 Prompt shown when deleting data​

Deletion must run after the background data synchronization task finishes. Retrying in 5 minutes, please wait! Attempt 1

You can wait for the program to run automatically, or wait a while and retry the deletion.

Was this page helpful?