Tabsets

Tabsets depend on the Asciidoctor Tabs extension.

Tabs syncing is controlled by the tabs-sync-option attribute. For more information, see the Asciidoctor Tabs documentation.

Basic tabset

  • Tab A

  • Tab B

  • Tab C

Contents of Tab A.

Contents of Tab B.

Contents of Tab C.

Second line in Tab C.

Tabset w/ code blocks

Tabset w/ codeblock and collapsible response
  • Command

  • Other Command

curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Result
{"data":{"name":"users_keyspace"}}
curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Result
{"data":{"name":"users_keyspace"}}
Tabset w/ only codeblocks
  • Command

  • Other Command

curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Complex tabset w/ nested tabsets

  • Tarball

  • Debian

  • CentOS

  1. If you haven’t already, start by downloading the Cassandra binary tarball. For example, to download Cassandra 4.1.2:

    • cURL

    • Wget

    curl -OL https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
    wget https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz

    To download a different version of Cassandra, visit the Apache Archives.

  2. Optional: Verify the integrity of the downloaded tarball using one of the methods here.

    1. For example, to verify the SHA256 hash of the downloaded file using GPG:

      gpg --print-md SHA256 apache-cassandra-4.1.2-bin.tar.gz
    2. Compare the output with the contents of the SHA256 file:

      curl -L https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz.sha256
  1. Instructions for Debian-based systems.

    1. For example, to verify the SHA256 hash of the downloaded file using GPG:

      • cURL

      • Wget

      curl -OL https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
      wget https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
    2. Compare the output with the contents of the SHA256 file:

      • cURL

      • Wget

      • Third subtab

      curl -L https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz.sha256
      wget --quiet -O - https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz.sha256
      7ce3103a76b8af76ffd8488d6bf484e1f175119617f3205ae0526c71d816c6f7

Just text.

Tab title rendering

These tabsets demonstrate the rendering for horizontal scrolling on tabs, as well as an experimental (unused) icon feature.

Tabset w/ overflow tab titles (default)
  • Tab Name

  • A Long Tab Name

  • A Really Long Tab Name

  • A Really Really Long Tab Name

  • Another Tab Name

Contents of Tab.

Contents of Long Tab.

Contents of Really Long Tab.

Contents of Really Really Long Tab.

Contents of Another Tab.

Tabset w/ wrapping tab titles (experimental)
  • Tab Name

  • A Long Tab Name

  • A Really Long Tab Name

  • A Really Really Long Tab Name

  • Another Tab Name

Contents of Tab.

Contents of Long Tab.

Contents of Really Long Tab.

Contents of Really Really Long Tab.

Contents of Another Tab.

Tabset icons (experimental)
  • cassandra original CQL

  • python original Python

  • java original Java

  • shell original REST API

USE cycling;
CREATE TABLE rank_by_year_and_name (
  race_year int,
  race_name text,
  cyclist_name text,
  rank int,
  PRIMARY KEY ((race_year, race_name), rank)
);
    log.info("creating table...")
    session.execute("""
        CREATE TABLE IF NOT EXISTS cyclist_by_year_and_name (
            race_year int,
            race_name text,
            rank int,
            cyclist_name text,
            PRIMARY KEY ((race_year,race_name),rank)
        )
        """)
CreateTable create = createTable("cycling", "cyclist_by_year_and_name")
    .withPartitionKey("race_year", DataTypes.INT)
    .withPartitionKey("race_name", DataTypes.TEXT)
    .withClusteringColumn("rank", DataTypes.INT)
    .withColumn("cyclist_name", DataTypes.TEXT);
// CREATE TABLE cycling.cyclist_by_year_and_name (race_year int,race_name text,rank int,cyclist_name text,PRIMARY KEY((race_year,race_name),rank))
curl -s --location \
--request POST http://localhost:8082/v2/schemas/keyspaces/cycling/tables \
--header "X-Cassandra-Token: $AUTH_TOKEN" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data '{
	"name": "cyclist_by_year_and_name",
	"columnDefinitions":
	  [
        {
	      "name": "race_year",
	      "typeDefinition": "int"
	    },
        {
	      "name": "race_name",
	      "typeDefinition": "text"
	    },
        {
	      "name": "rank",
	      "typeDefinition": "int"
	    }
        ,
        {
          "name": "cyclist_name",
          "typeDefinition": "text"
        }
	  ],
	"primaryKey":
	  {
	    "partitionKey": ["race_year", "race_name"],
	    "clusteringKey": ["rank"]
	  },
	"tableOptions":
	  {
	    "defaultTimeToLive": 0,
	    "clusteringExpression":
	      [{ "column": "rank", "order": "ASC" }]
	  }
}'

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

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