How to get record PK (primary key) with aql



Hi, is it possible to see record PK?

select * from namespace does not return it.



You can not get PK through aql.

If you want to get primary keys of record resulting of scan or query, first you need to write the records with sendKey true in write policy. Here is the link for java client -

Once you have done this you will be able to read primary key in record’s metadata in your application code.




Got it, thanks!


I opened a feature request internally, TOOLS-551 and TOOLS-539. Keep an eye out for a mention of it in the release notes.