Getting started

Table of contents

Installation

See also

Consult the Compatibility appendix for prerequisites information.

Python package

Crash is available as a pip package.

To install, run:

sh$ pip install crash

Now, run it:

sh$ crash

To update, run:

sh$ pip install -U crash

Standalone

Crash is also available as a standalone executable that includes all the necessary dependencies, and can be run as long as Python (>= 3.4) is available on your system.

First, download the executable file:

sh$ curl -o crash https://cdn.crate.io/downloads/releases/crash_standalone_latest

Then, set the executable bit:

sh$ chmod +x crash

Now, run it:

sh$ ./crash

If you would like to run crash from any directory, and without the leading ./, the file has to be in a directory that is on your PATH.

Legacy versions

For Python 2.7 and 3.3 please download version 0.23.0 from the CDN:

sh$ curl -o crash https://cdn.crate.io/downloads/releases/crash_standalone_0.23.0

For Python 2.6 please download version 0.16.2 from the CDN:

sh$ curl -o crash https://cdn.crate.io/downloads/releases/crash_standalone_0.16.2

Run

You can start Crash like so:

sh$ crash

When crash is run without any additional arguments, it will attempt to connect to localhost:4200. To connect to another host, use the --hosts flag. For example:

sh$ crash --host "198.51.100.1"

If you are experiencing a connection error, try the --verbose flag:

sh$ crash --verbose

When run with --verbose, Crash will print useful information about what it is doing to STDOUT. This includes connection attempts and full stack traces (in the case of an error).

See also

For more help, see Running Crash.

Query

When you run Crash, you will see something like this:

A screenshot of Crash after startup

This is an interactive shell. You can type any CrateDB SQL query at the cr> prompt.

Queries are autocompleted as you type:

A screenshot of Crash while typing a query

Once you have entered your query, hit Enter to run.

You should see something like this:

A screenshot of Crash after executing a query

See also

For more help, see Commands or Response formats.