All Products
Search
Document Center

PolarDB:ST_AKID

Last Updated:Mar 28, 2026
Important

This function is not supported in later versions. Use Cold data tiered storage instead.

Returns the AccessKey ID used to access the Object Storage Service (OSS) bucket where a trajectory object's data is stored. Call this function to inspect which AccessKey ID is associated with a given trajectory object — for example, before rotating or updating credentials in bulk.

Prerequisites

The trajectory object's data must be stored in an OSS bucket. If the data is not stored in OSS, the function returns null.

Syntax

text ST_AKID(trajectory traj)

Return type: text

Parameters

ParameterDescription
trajThe trajectory object to query.

Usage notes

An AccessKey pair consists of an AccessKey ID and an AccessKey secret. The AccessKey ID identifies who is making the request (similar to a username), and the AccessKey secret authenticates the request (similar to a password). Both are required to access an OSS bucket. When you read trajectory data from a file in an OSS bucket, you must provide the AccessKey pair information to access the OSS bucket.

Example

SELECT ST_AKID(traj) FROM trajs;

Expected output:

       st_akid
--------------------------
 $(OSS_USER)
 $(OSS_USER)
 $(OSS_USER)

What's next

This function is not supported in later versions. To manage OSS access credentials for trajectory data in supported versions, use Cold data tiered storage.