Skip to main content

The Crate Data Shell

Project description

Crate Test Version Downloads

Overview

This is the Crate Data shell called crash.

Installation

Installing via pip

To install crash via pip use the following command:

$ pip install crash

To update use:

$ pip install -U crash

Standalone

There is also a single file executable that includes all dependencies and can be run as long as python (>= 2.6) is available on the system.

Download Crash bundle

Invocation

If the package was installed using pip the shell can be started by running the command crash in a terminal.

For usage information and command line options invoke:

crash --help

Help & Contact

Do you have any questions? Or suggestions? We would be very happy to help you. So, feel free to swing by our IRC channel #crate on Freenode. Or for further information and official contact please visit https://crate.io/.

License

Copyright 2013-2014 CRATE Technology GmbH (“Crate”)

Licensed to CRATE Technology GmbH (“Crate”) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Crate licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

However, if you have executed another commercial license agreement with Crate these terms will supersede the license and you may use the software solely pursuant to the terms of the relevant commercial agreement.

Crate Shell

The crash shell provides a CLI for the Crate Server.

If the package was installed using pip the shell can be started by invoking crash in a terminal.

crash by default will try to connect to localhost:4200. To connect to another host use the connect command inside the shell or use the –hosts argument when launching the shell.

When you connect to a server that is not reachable or whose hostname cannot be resolved you will get an error:

cr> connect 127.0.0.1:65535
+------------------------+-----------+-----------+---------------------...-+
| server_url             | node_name | connected | message                 |
+------------------------+-----------+-----------+---------------------...-+
| http://127.0.0.1:65535 | NULL      | FALSE     | Server not available... |
+------------------------+-----------+-----------+---------------------...-+
CONNECT ERROR

cr> connect null.lol:4200
+----------------------+-----------+-----------+---------------------...-+
| server_url           | node_name | connected | message                 |
+----------------------+-----------+-----------+---------------------...-+
| http://null.lol:4200 | NULL      | FALSE     | Server not available... |
+----------------------+-----------+-----------+---------------------...-+
CONNECT ERROR

Successful connects will give you some information about the servers you connect to:

cr> connect 127.0.0.1:44209
+------------------------+-----------+-----------+---------+
| server_url             | node_name | connected | message |
+------------------------+-----------+-----------+---------+
| http://127.0.0.1:44209 | crate     | TRUE      | OK      |
+------------------------+-----------+-----------+---------+
CONNECT OK

If you connect to more than one server, the command will succeed if at least one server is reachable:

cr> CONNECT 127.0.0.1:44209 null.lol:4295
+------------------------+-----------+-----------+---------------------...-+
| server_url             | node_name | connected | message                 |
+------------------------+-----------+-----------+---------------------...-+
| http://127.0.0.1:44209 | crate     | TRUE      | OK                      |
| http://null.lol:4295   | NULL      | FALSE     | Server not available... |
+------------------------+-----------+-----------+---------------------...-+
CONNECT OK

Once the shell is connected, SQL statements can be executed simply by entering them without any special arguments like this:

cr> SELECT schema_name, table_name from information_schema.tables
... order by table_name
+--------------------+-------------------+
| schema_name        | table_name        |
+--------------------+-------------------+
| sys                | cluster           |
| information_schema | columns           |
| sys                | nodes             |
| sys                | shards            |
| information_schema | table_constraints |
| information_schema | tables            |
+--------------------+-------------------+
SELECT 6 rows in set (... sec)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crash-0.9.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

crash-0.9.0-py2.py3-none-any.whl (14.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file crash-0.9.0.tar.gz.

File metadata

  • Download URL: crash-0.9.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for crash-0.9.0.tar.gz
Algorithm Hash digest
SHA256 38de0c2ca74ae6fec00172cbe5eae2fb158b5e5facd1e85f610f9e394c7b0668
MD5 b883026f7139cf8a04eefba03ae3a9d5
BLAKE2b-256 cc1bd82540570459e38eeceacf49428dcd04074be2cd09702aea32e2597adbe2

See more details on using hashes here.

File details

Details for the file crash-0.9.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for crash-0.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dec32e22016dbb297d6935cf783bd4a2a70da0f3f30a273b02492586fc4b1be6
MD5 c589e22ad266c102ddc84c5e12bad269
BLAKE2b-256 78fc927e11733aeba02ff49591cb0b0a04241878d71364f6de0c471d29361c0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page