Articles in this section

How do I view the meta-data of a record from AQL in JSON format?

Context

To retrieve the meta-data of a record which are digest, generation and TTL, use the RECORD_PRINT_METADATA setting in AQL. This is visible in both JSON and Tabular format.

Method

Example view in JSON format

aql> SET OUTPUT JSON
aql> SET RECORD_PRINT_METADATA true
aql> insert into test.testset (PK,bin) values (200,20000)
OK, 1 record affected.

aql> select * from test.testset where PK=200
[
  {
    "digest": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
    "ttl": 2592000,
    "gen": 1,
    "bins": {
      "bin": 20000
    }
  }
]

To revert view in Tabular format

aql> SET OUTPUT TABLE

Notes

Documentation reference for more AQL settings: http://www.aerospike.com/docs/tools/aql/settings.html

To know more about data-model in Aerospike: http://www.aerospike.com/docs/architecture/data-model.html


Applies To Earliest Version

Pre 4.9

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful