Imports trajectory data stored in Object Storage Service (OSS) into the PolarDB database. If the trajectory data already resides in a PolarDB database table, returns the trajectory data as-is.
Syntax
trajectory ST_importFrom(trajectory traj);Parameters
| Parameter | Description |
|---|---|
traj | The trajectory object. |
Description
ST_ImportFrom is the reverse of ST_ExportTo. Its behavior depends on where the trajectory data is stored:
Data in PolarDB: Returns the trajectory data without modification.
Data in OSS: Imports the trajectory data into the PolarDB database.
The function does not modify the OSS file that stores the trajectory data.
Use ST_ImportFrom with an UPDATE statement to move trajectory data from OSS back to PolarDB.
Example
Move all trajectory data in the trajs table from OSS to PolarDB:
UPDATE trajs
SET traj = ST_ImportFrom(traj);Output:
UPDATE 4该文章对您有帮助吗?