sstabledump

Dumps contents of given SSTable to standard output in JSON format.

The default location of this SSTable tool depends on the type of installation:

  • Package installations: /usr/bin/

  • Tarball installations: <installation_location>/resources/cassandra/tools/bin

Synopsis

sstabledump
[-d] [-e] [-k <partition_key>]
[-l] [-t] [-x <partition_key>]
<sstable_filepath>

Definition

The short form and long form parameters are comma-separated.

Command arguments

-d

Display a CQL row per line.

-e

Display a list of partition keys.

-k, --key partition_key

Partition key to include.

-l

Output JSON lines, by partition.

-t

Print raw timestamps instead of ISO 8601 date strings.

-x, --exclude-key partition_key

Partition key to exclude. Ignored if -y option is given.

Examples

Dump contents of SSTable

sstabledump /var/lib/cassandra/data/cycling/birthday_list-f4f24621ce3f11e89d32bdcab3a99c6f/aa-1-bti-Statistics.db
[
  {
    "partition" : {
      "key" : [ "Claudio HEINEN" ],
      "position" : 0
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 90,
        "liveness_info" : { "tstamp" : "2018-10-12T16:58:00.368228Z" },
        "cells" : [
          { "name" : "blist_", "deletion_info" : { "marked_deleted" : "2018-10-12T16:58:00.368227Z", "local_delete_time" : "2018-10-12T16:58:00Z" } },
          { "name" : "blist_", "path" : [ "bday" ], "value" : "27/07/1992" },
          { "name" : "blist_", "path" : [ "blist_age" ], "value" : "23" },
          { "name" : "blist_", "path" : [ "blist_nation" ], "value" : "GERMANY" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "Claudio VANDELLI" ],
      "position" : 91
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 179,
        "liveness_info" : { "tstamp" : "2018-10-12T16:58:00.354443Z" },
        "cells" : [
        { "name" : "blist_", "deletion_info" : { "marked_deleted" : "2018-10-12T16:58:00.354442Z", "local_delete_time" : "2018-10-12T16:58:00Z" } },
        { "name" : "blist_", "path" : [ "bday" ], "value" : "27/07/1961" },
        { "name" : "blist_", "path" : [ "blist_age" ], "value" : "54" },
        { "name" : "blist_", "path" : [ "blist_nation" ], "value" : "ITALY" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "Luc HAGENAARS" ],
      "position" : 180
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 275,
        "liveness_info" : { "tstamp" : "2018-10-12T16:58:00.374846Z" },
        "cells" : [
          { "name" : "blist_", "deletion_info" : { "marked_deleted" : "2018-10-12T16:58:00.374845Z", "local_delete_time" : "2018-10-12T16:58:00Z" } },
          { "name" : "blist_", "path" : [ "bday" ], "value" : "27/07/1987" },
          { "name" : "blist_", "path" : [ "blist_age" ], "value" : "28" },
          { "name" : "blist_", "path" : [ "blist_nation" ], "value" : "NETHERLANDS" }
        ]
      }
    ]
  }
]

Show a row per line in standard output of the cycling.birthday_list table

sstabledump /var/lib/cassandra/data/cycling/birthday_list-e439b9222bc511e8891b23da85222d3d/aa-2-bti-Data.db -d
[Claudio HEINEN]@0 Row[info=[ts=1521498957445075] ]:  | , [blist[age]=23 ts=1521498957445075], [blist[bday]=27/07/1992 ts=1521498957445075], [blist[nation]=GERMANY ts=1521498957445075]
[Claudio VANDELLI]@76 Row[info=[ts=1521498957437559] ]:  | , [blist[age]=54 ts=1521498957437559], [blist[bday]=27/07/1961 ts=1521498957437559], [blist[nation]=ITALY ts=1521498957437559]
[Luc HAGENAARS]@152 Row[info=[ts=1521498957448698] ]:  | , [blist[age]=28 ts=1521498957448698], [blist[bday]=27/07/1987 ts=1521498957448698], [blist[nation]=NETHERLANDS ts=1521498957448698]
[Toine POELS]@232 Row[info=[ts=1521498957451068] ]:  | , [blist[age]=52 ts=1521498957451068], [blist[bday]=27/07/1963 ts=1521498957451068], [blist[nation]=NETHERLANDS ts=1521498957451068]
[Allan DAVIS]@310 Row[info=[ts=1521498957430478] ]:  | , [blist[age]=35 ts=1521498957430478], [blist[bday]=27/07/1980 ts=1521498957430478], [blist[nation]=AUSTRALIA ts=1521498957430478]
[Laurence BOURQUE]@384 Row[info=[ts=1521498957441360] ]:  | , [blist[age]=23 ts=1521498957441360], [blist[bday]=27/07/1992 ts=1521498957441360], [blist[nation]=CANADA ts=1521498957441360]

Display a list of partition keys from the cycling.birthday_list table

sstabledump /var/lib/cassandra/data/cycling/birthday_list-e439b9222bc511e8891b23da85222d3d/aa-2-bti-Data.db -e
[ [ "Claudio HEINEN" ], [ "Claudio VANDELLI" ], [ "Luc HAGENAARS" ], [ "Toine POELS" ], [ "Allan DAVIS" ], [ "Laurence BOURQUE" ] ]

Display all rows in the partition

sstabledump /var/lib/cassandra/data/cycling/birthday_list-e439b9222bc511e8891b23da85222d3d/aa-2-bti-Data.db -k "Claudio HEINEN"
{
    "partition" : {
      "key" : [ "Claudio HEINEN" ],
      "position" : 0
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 75,
        "liveness_info" : { "tstamp" : "2018-03-19T22:35:57.445075Z" },
        "cells" : [
          { "name" : "blist", "path" : [ "age" ], "value" : "23" },
          { "name" : "blist", "path" : [ "bday" ], "value" : "27/07/1992" },
          { "name" : "blist", "path" : [ "nation" ], "value" : "GERMANY" }
        ]
      }
    ]
  }
]

Display all rows except those in the specified partition

sstabledump /var/lib/cassandra/data/cycling/birthday_list-e439b9222bc511e8891b23da85222d3d/aa-2-bti-Data.db -x "Claudio HEINEN"
  {
    "partition" : {
      "key" : [ "Claudio VANDELLI" ],
      "position" : 0
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 151,
        "liveness_info" : { "tstamp" : "2018-03-19T22:35:57.437559Z" },
        "cells" : [
          { "name" : "blist", "path" : [ "age" ], "value" : "54" },
          { "name" : "blist", "path" : [ "bday" ], "value" : "27/07/1961" },
          { "name" : "blist", "path" : [ "nation" ], "value" : "ITALY" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "Luc HAGENAARS" ],
      "position" : 152
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 231,
        "liveness_info" : { "tstamp" : "2018-03-19T22:35:57.448698Z" },
        "cells" : [
          { "name" : "blist", "path" : [ "age" ], "value" : "28" },
          { "name" : "blist", "path" : [ "bday" ], "value" : "27/07/1987" },
          { "name" : "blist", "path" : [ "nation" ], "value" : "NETHERLANDS" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "Toine POELS" ],
      "position" : 232
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 309,
        "liveness_info" : { "tstamp" : "2018-03-19T22:35:57.451068Z" },
        "cells" : [
          { "name" : "blist", "path" : [ "age" ], "value" : "52" },
          { "name" : "blist", "path" : [ "bday" ], "value" : "27/07/1963" },
          { "name" : "blist", "path" : [ "nation" ], "value" : "NETHERLANDS" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "Allan DAVIS" ],
      "position" : 310
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 383,
        "liveness_info" : { "tstamp" : "2018-03-19T22:35:57.430478Z" },
        "cells" : [
          { "name" : "blist", "path" : [ "age" ], "value" : "35" },
          { "name" : "blist", "path" : [ "bday" ], "value" : "27/07/1980" },
          { "name" : "blist", "path" : [ "nation" ], "value" : "AUSTRALIA" }
        ]
      }
    ]
  },
  {
    "partition" : {
      "key" : [ "Laurence BOURQUE" ],
      "position" : 384
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 460,
        "liveness_info" : { "tstamp" : "2018-03-19T22:35:57.441360Z" },
        "cells" : [
          { "name" : "blist", "path" : [ "age" ], "value" : "23" },
          { "name" : "blist", "path" : [ "bday" ], "value" : "27/07/1992" },
          { "name" : "blist", "path" : [ "nation" ], "value" : "CANADA" }
        ]
      }
    ]
  }
]

Display each row in its own JSON map

sstabledump /var/lib/cassandra/data/cycling/birthday_list-e439b9222bc511e8891b23da85222d3d/aa-2-bti-Data.db -l
{"partition":{"key":["Claudio HEINEN"],"position":0},"rows":[{"type":"row","position":75,"liveness_info":{"tstamp":"2018-03-19T22:35:57.445075Z"},"cells":[{"name":"blist","path":["age"],"value":"23"},{"name":"blist","path":["bday"],"value":"27/07/1992"},{"name":"blist","path":["nation"],"value":"GERMANY"}]}]}
{"partition":{"key":["Claudio VANDELLI"],"position":76},"rows":[{"type":"row","position":151,"liveness_info":{"tstamp":"2018-03-19T22:35:57.437559Z"},"cells":[{"name":"blist","path":["age"],"value":"54"},{"name":"blist","path":["bday"],"value":"27/07/1961"},{"name":"blist","path":["nation"],"value":"ITALY"}]}]}
{"partition":{"key":["Luc HAGENAARS"],"position":152},"rows":[{"type":"row","position":231,"liveness_info":{"tstamp":"2018-03-19T22:35:57.448698Z"},"cells":[{"name":"blist","path":["age"],"value":"28"},{"name":"blist","path":["bday"],"value":"27/07/1987"},{"name":"blist","path":["nation"],"value":"NETHERLANDS"}]}]}
{"partition":{"key":["Toine POELS"],"position":232},"rows":[{"type":"row","position":309,"liveness_info":{"tstamp":"2018-03-19T22:35:57.451068Z"},"cells":[{"name":"blist","path":["age"],"value":"52"},{"name":"blist","path":["bday"],"value":"27/07/1963"},{"name":"blist","path":["nation"],"value":"NETHERLANDS"}]}]}
{"partition":{"key":["Allan DAVIS"],"position":310},"rows":[{"type":"row","position":383,"liveness_info":{"tstamp":"2018-03-19T22:35:57.430478Z"},"cells":[{"name":"blist","path":["age"],"value":"35"},{"name":"blist","path":["bday"],"value":"27/07/1980"},{"name":"blist","path":["nation"],"value":"AUSTRALIA"}]}]}
{"partition":{"key":["Laurence BOURQUE"],"position":384},"rows":[{"type":"row","position":460,"liveness_info":{"tstamp":"2018-03-19T22:35:57.441360Z"},"cells":[{"name":"blist","path":["age"],"value":"23"},{"name":"blist","path":["bday"],"value":"27/07/1992"},{"name":"blist","path":["nation"],"value":"CANADA"}]}]}

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com