Skip to content

Commit

Permalink
docs(adapters): Add Cassandra Adapter (#88)
Browse files Browse the repository at this point in the history
Adding documentation regarding support for the experimental Cassandra
adapter.
  • Loading branch information
vkhitrin authored Jun 11, 2024
1 parent cd4afee commit 091bbce
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions src/docs/cassandra/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: "Adapter: Cassandra"
menuOrder: 160
---

**CAUTION: This adapter is unstable and experimental.**

**NOTE: This adapter does not aim to support [Scylla](https://www.scylladb.com).**

## Integration With Harlequin

**Some quirks are to be expected.**

Cassandra doesn't use cursor(s), thus `HarlequinCursor` and `HarlequinConnection`
behave differently in this adapter.

A manual translation of `cassandra-driver` objects types to Python types is
required for Apache Arrow to work correctly.

In this adapter, [`Transaction Modes`](https://harlequin.sh/docs/transactions) refers to
Cassandra's consistency levels.

## Installation

### Using pip

To install this adapter into an activated virtual environment:

```bash
pip install harlequin-cassandra
```

### Using poetry

```bash
poetry add harlequin-cassandra
```

### Using pipx

If you do not already have Harlequin installed:

```bash
pip install harlequin-cassandra
```

If you would like to add the Cassandra adapter to an existing Harlequin installation:

```bash
pipx inject harlequin harlequin-cassandra
```

### As an Extra

Alternatively, you can install Harlequin with the `cassandra` extra:

```bash
pip install harlequin[cassandra]
```

```bash
poetry add harlequin[cassandra]
```

```bash
pipx install harlequin[cassandra]
```

## Usage and Configuration

To see the full list of options, run:

```bash
harlequin --help
```

- `--host` - Specifies the initial host to connect to. After the driver successfully connects to the node, it will auto discoverthe rest of the nodes in the cluster and will connect to them.
- `--port` - Port number to connect to at the server host.
- `--keyspace` - The keyspace name to use when connecting with the Cassandra server.
- `--username` - Cassandra user name to connect as.
- `--password` - Password to be used if the server demands password authentication.
- `--protocol-version` - The maximum version of the native protocol to use. If not specified, will be auto-discovered by the driver.
- `--consistency-level` - Specifies how many replicas must respond for an operation to be considered asuccess.
Binary file added src/lib/assets/databases/cassandra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 091bbce

Please sign in to comment.