https://github.com/wangfenjin/xeus-clickhouse
A Jupyter kernel for ClickHouse
https://github.com/wangfenjin/xeus-clickhouse
clickhouse clickhouse-client jupyter jupyter-kernels
Last synced: 20 days ago
JSON representation
A Jupyter kernel for ClickHouse
- Host: GitHub
- URL: https://github.com/wangfenjin/xeus-clickhouse
- Owner: wangfenjin
- License: bsd-3-clause
- Created: 2020-06-24T02:35:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-28T12:42:01.000Z (about 5 years ago)
- Last Synced: 2025-04-08T06:21:46.916Z (3 months ago)
- Topics: clickhouse, clickhouse-client, jupyter, jupyter-kernels
- Language: C++
- Homepage:
- Size: 48.8 KB
- Stars: 24
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# xeus-clickhouse
[](https://travis-ci.com/github/wangfenjin/xeus-clickhouse)
[](https://mybinder.org/v2/gh/wangfenjin/xeus-clickhouse/master?filepath=example%2Fclickhouse.ipynb)**xeus-clickhouse is and early developer preview and is not suitable for general usage yet. Features and implementation are subject to change.**
`xeus-clickhouse` is a Jupyter kernel for ClickHouse. It's SQL based on the native implementation of the Jupyter protocol [xeus](https://github.com/jupyter-xeus/xeus).
## Give it a Try!
Try it using binder or launch Jupyter using `docker` and launch a new SQL notebook by selecting the **xclickhouse** kernel:
```bash
# start jupyter with clickhouse kernal
docker run -p 8888:8888 wangfenjin/xeus-clickhouse# start a local clickhouse for testing
docker run -d --name jupyter-clickhouse-server -p 9000:9000 --ulimit nofile=262144:262144 yandex/clickhouse-server# open the example/clickhouse.ipynb and connect to local server by
# %CONNECT --host host.docker.internal --port 9000
# The port is 9000, which is TCP port!
```## Installation
To ensure that the installation works, it is preferable to install xeus-clickhouse in a fresh conda environment. It is also needed to use a miniconda installation because with the full anaconda you may have a conflict.
The safest usage is to create an environment named xeus-clickhouse with your miniconda installation
```bash
conda create -n xeus-clickhouse
conda activate xeus-clickhouse
```### Installing from conda
WIP
### Installing from source
To install the xeus-clickhouse dependencies
```bash
conda install cmake nlohmann_json xtl cppzmq xeus cpp-tabulate=1.2 -c conda-forge
```Then you can compile the sources
```bash
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..
make
make install
```## Documentation
Refer to examples/
## Dependencies
``xeus-clickhouse`` depends on
- [xeus](https://github.com/jupyter-xues/xeus)
- [clickhouse-cpp](https://github.com/ClickHouse/clickhouse-cpp)
- [Tabulate](https://github.com/p-ranav/tabulate)## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md) to know how to contribute and set up a development environment.
## Credits
This project is inspired by [xeus-sqlite](https://github.com/jupyter-xeus/xeus-sqlite), and reuse many code/doc from the project! Thanks!
## License
We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.This software is licensed under the BSD-3-Clause license. See the [LICENSE](LICENSE) file for details.