This function is not supported in later versions. Use Cold data tiered storage instead.
Resets the AccessKey pair used to access the Object Storage Service (OSS) bucket that stores a trajectory object's data.
Syntax
trajectory ST_SetAccessKey(trajectory traj, text akid, text aksecret, bool checkvalid default true);Parameters
| Parameter | Description |
|---|---|
traj | The trajectory object. |
akid | The AccessKey ID used to access the OSS bucket. |
aksecret | The AccessKey secret used to access the OSS bucket. |
checkvalid | Specifies whether to validate the AccessKey pair. Default value: true. When set to true, the system tests whether the AccessKey pair can access the OSS bucket and returns an error if the test fails. |
Description
Reading trajectory data from a file in an OSS bucket requires an AccessKey pair to authenticate access. An AccessKey pair consists of an AccessKey ID (similar to a username) and an AccessKey secret (similar to a password). ST_SetAccessKey resets this AccessKey pair for a specified trajectory object.
Examples
SELECT ST_SetAccessKey(traj, '<OSS_USER>', '<OSS_PWD>') FROM trajs;Output:
st_setaccesskey
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{"trajectory":{"version":1,"type":"STPOINT","leafcount":6,"start_time":"Sat Jan 01 03:15:42 2000","end_time":"Sat Jan 01 05:16:43 2000","spatial":"LINESTRING(2 2 0,33.042158099636 36.832684322819 0,47.244002354518 47.230026333034 0,64.978971942887 60.618813472986 0,77.621717839502 78.012496630661 0,80 78 0)","timeline":["Sat Jan 01 03:15:42 2000","Sat Jan 01 03:39:54 2000","Sat Jan 01 04:04:06 2000","Sat Jan 01 04:28:18 2000","Sat Jan 01 04:52:31 2000","Sat Jan 01 05:16:43 2000"]}}
{"trajectory":{"version":1,"type":"STPOINT","leafcount":6,"start_time":"Sat Jan 01 03:15:42 2000","end_time":"Sat Jan 01 05:16:43 2000","spatial":"LINESTRING(2 2 0,33.042158099636 36.832684322819 0,47.244002354518 47.230026333034 0,64.978971942887 60.618813472986 0,77.621717839502 78.012496630661 0,80 78 0)","timeline":["Sat Jan 01 03:15:42 2000","Sat Jan 01 03:39:54 2000","Sat Jan 01 04:04:06 2000","Sat Jan 01 04:28:18 2000","Sat Jan 01 04:52:31 2000","Sat Jan 01 05:16:43 2000"]}}
{"trajectory":{"version":1,"type":"STPOINT","leafcount":6,"start_time":"Sat Jan 01 03:15:42 2000","end_time":"Sat Jan 01 05:16:43 2000","spatial":"LINESTRING(2 2,33.042158099636 36.832684322819,47.244002354518 47.230026333034,64.978971942887 60.618813472986,77.621717839502 78.012496630661,80 78)","timeline":["Sat Jan 01 03:15:42 2000","Sat Jan 01 03:39:54 2000","Sat Jan 01 04:04:06 2000","Sat Jan 01 04:28:18 2000","Sat Jan 01 04:52:31 2000","Sat Jan 01 05:16:43 2000"]}}
TRAJECTORY EMPTY
(4 rows)