# Command line querying

**URL:** <https://discuss.aerospike.com/t/command-line-querying/3727>\
**Category:** Tools\
**Created:** [December 29, 2016, 6:26pm UTC](https://discuss.aerospike.com/t/command-line-querying/3727 "2016-12-29T18:26:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![isingh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/isingh/32/145_2.png) [@isingh](https://discuss.aerospike.com/u/isingh)\
**Post date:** [December 29, 2016, 6:26pm UTC](https://discuss.aerospike.com/t/command-line-querying/3727/1 "2016-12-29T18:26:42Z")

</div>

cli has been deprecated in Aerospike 3.9. I am using aql to query records but aql doesnt return the complete data for big bins. It will truncate the data returned. Is it possible for it to truly dump the whole record? If not, is it possible to use the deprecated cli?

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [December 29, 2016, 7:25pm UTC](https://discuss.aerospike.com/t/command-line-querying/3727/2 "2016-12-29T19:25:41Z")

</div>

How big is the bin data? You might want to also try the following settings - valid only for the current aql session.

```auto
aql> set output json
aql> set record_print_metadata true

aql> select * from test.demo where PK="testKey2"
[
  {
    "digest": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
    "ttl": 10906,
    "gen": 5,
    "bins": {
      "test-bin-1": 1234,
      "test-bin-2": "test-bin-2-data"
    }
  }
]

```

**Caveat:** AQL bug - any output with where clause shows incorrect digest value.

---

<div class="post-metadata">

**Author:** ![isingh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/isingh/32/145_2.png) [@isingh](https://discuss.aerospike.com/u/isingh)\
**Post date:** [December 29, 2016, 7:50pm UTC](https://discuss.aerospike.com/t/command-line-querying/3727/3 "2016-12-29T19:50:07Z")

</div>

Thanks, but that doesnt work for me. The record is at max record size (which is why I want to dump the record).

Setting output as json actually returns empty data for bin. I dont care about metadata, but want to do dump the entire record.

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [December 29, 2016, 7:54pm UTC](https://discuss.aerospike.com/t/command-line-querying/3727/4 "2016-12-29T19:54:29Z")

</div>

OK. You could probably quickly roll your own custom tool. If you install the C client, there is an examples subdirectoy which has basic put / get etc. You could also look at trimmed down version I have for _put_ and modify for _get_ at: [https://github.com/pygupta/aerospike-discuss/tree/master/topic3717](https://github.com/pygupta/aerospike-discuss/tree/master/topic3717) Look at example.c and Makefile, add some command line options and roll your own tool?
