docs/en/06-advanced/05-data-in/22-pspace.md
This section describes how to create data migration/data synchronization tasks through the Explorer UI to migrate/synchronize data from pSpace to the current TDengine TSDB cluster.
TDengine TSDB can efficiently read data from pSpace and write it to TDengine TSDB for historical data migration or real-time data synchronization.
On the Data In page, click + Add Data Source to enter the Add Data Source page.
In Name, enter a task name, for example: "test_pspace".
In the Type drop-down list, select pSpace.
Proxy is optional. If needed, select a proxy from the drop-down list, or click + Create New Proxy on the right first.
In the Target Database drop-down list, select a target database, or click + Create Database on the right first.
In the Connection Configuration section, fill in Server Address and Server Port.
In the Authentication section, fill in Username and Password.
Click Connectivity Check to verify whether the data source is available.
In Data Points, configure the following items:
\Beijing\Chaoyang\Wangjing means traversal starts from \Beijing\Chaoyang\Wangjing and proceeds downward. By default, traversal starts from the root node.\Beijing\Chaoyang\Wangjing\temperature-* means all data points under \Beijing\Chaoyang\Wangjing whose names start with "temperature-".{type} placeholder. Example: pspace_{type}.{point_id} placeholder. Example: t_{point_id}.original_ts, request_ts, and received_ts.ts.val.(val-32)/1.8.quality.{LongName}).After configuring Root Node and Data Point Name, click View Data Point List to view matching data points, then continue configuring the remaining mapping rules.
In Upload CSV Configuration File, click Download Data Points, select the required Root Node and Data Point Name, and a CSV configuration file will be generated and downloaded locally. Modify the generated CSV file as needed and upload it again.
In the Collection Configuration section, fill in collection-related parameters.
pSpace supports three collection modes: Historical Query, Real-time Subscription, and Query Sync.
Select Historical Query mode and configure: Start Time, End Time, and Query Window.
Select Real-time Subscription mode. No additional parameters are required.
Select Query Sync mode and configure: Start Time, Query Window, Out-of-order Tolerance, and Query Interval.
In the Advanced Options section, configure other parameters as needed.
Click Submit to complete task creation. After submitting, return to the Data In page to view the task status.