Productive no-sql data sources exploration with SQL, Pandas and shortcuts
Project description
# Data Cli
> Productive no-sql data sources exploration with SQL, Pandas and
> shortcuts
| service | status |
| --------------------- |:-------------:|
| travis | [![Build Status](https://travis-ci.org/hackliff/mgocli.svg?branch=master)](https://travis-ci.org/hackliff/mgocli) |
| quay.io/hackliff/drill | [![Docker Repository on Quay](https://quay.io/repository/hackliff/drill/status "Docker Repository on Quay")](https://quay.io/repository/hackliff/drill) |
## Getting started
`make container.build` will start and initialize [MongoDB](), [Drill]()
and `datacli` with everything installed.
It is still possible to register external data sources :
```Bash
$ cp ./tools/drill/mongo-storage-plugin.json custom-storage.json
$ $EDITOR custom-storage.json
$ ./tools/drill/manage.sh storage ./custom-storage.json http://$(docker-machine ip default):8047
{
"result" : "success"
}
```
## Usage
### Mgocli
```Bash
$ ./datacli/__main__.py -H $(docker-machine ip default) appturbo
[2016-07-06 06:38:24,564] datacli :: INFO - connected to Drillbit
[ datacli::192.168.99.100::appturbo ] >>> SHOW DATABASES
[2016-07-06 06:38:48,391] datacli :: INFO - sending query to drill
[show databases]
SCHEMA_NAME
0 INFORMATION_SCHEMA
1 cp.default
2 dfs.default
3 dfs.root
4 dfs.tmp
```
### Drill Repl
```sql
$ # query data
$ docker exec -it $(basename $PWD)_drill_1 /opt/apache-drill-1.7.0/bin/drill-localhost
0: jdbc:drill:drillbit=localhost> SHOW DATABASES;
+---------------------+
| SCHEMA_NAME |
+---------------------+
| INFORMATION_SCHEMA |
| cp.default |
| dfs.default |
| dfs.root |
| dfs.tmp |
| nosqltest.employee |
| nosqltest.local |
| nosqltest.test |
| sys |
+---------------------+
9 rows selected (0.244 seconds)
0: jdbc:drill:drillbit=localhost> SELECT * FROM nosqltest.test.zips
LIMIT 3;
+--------+----------+-------------------------+--------+--------+
| _id | city | loc | pop | state |
+--------+----------+-------------------------+--------+--------+
| 01001 | AGAWAM | [-72.622739,42.070206] | 15338 | MA |
| 01002 | CUSHMAN | [-72.51565,42.377017] | 36963 | MA |
| 01005 | BARRE | [-72.108354,42.409698] | 4546 | MA |
+--------+----------+-------------------------+--------+--------+
3 rows selected (0.325 seconds)
0: jdbc:drill:drillbit=localhost> !quit
```
> Productive no-sql data sources exploration with SQL, Pandas and
> shortcuts
| service | status |
| --------------------- |:-------------:|
| travis | [![Build Status](https://travis-ci.org/hackliff/mgocli.svg?branch=master)](https://travis-ci.org/hackliff/mgocli) |
| quay.io/hackliff/drill | [![Docker Repository on Quay](https://quay.io/repository/hackliff/drill/status "Docker Repository on Quay")](https://quay.io/repository/hackliff/drill) |
## Getting started
`make container.build` will start and initialize [MongoDB](), [Drill]()
and `datacli` with everything installed.
It is still possible to register external data sources :
```Bash
$ cp ./tools/drill/mongo-storage-plugin.json custom-storage.json
$ $EDITOR custom-storage.json
$ ./tools/drill/manage.sh storage ./custom-storage.json http://$(docker-machine ip default):8047
{
"result" : "success"
}
```
## Usage
### Mgocli
```Bash
$ ./datacli/__main__.py -H $(docker-machine ip default) appturbo
[2016-07-06 06:38:24,564] datacli :: INFO - connected to Drillbit
[ datacli::192.168.99.100::appturbo ] >>> SHOW DATABASES
[2016-07-06 06:38:48,391] datacli :: INFO - sending query to drill
[show databases]
SCHEMA_NAME
0 INFORMATION_SCHEMA
1 cp.default
2 dfs.default
3 dfs.root
4 dfs.tmp
```
### Drill Repl
```sql
$ # query data
$ docker exec -it $(basename $PWD)_drill_1 /opt/apache-drill-1.7.0/bin/drill-localhost
0: jdbc:drill:drillbit=localhost> SHOW DATABASES;
+---------------------+
| SCHEMA_NAME |
+---------------------+
| INFORMATION_SCHEMA |
| cp.default |
| dfs.default |
| dfs.root |
| dfs.tmp |
| nosqltest.employee |
| nosqltest.local |
| nosqltest.test |
| sys |
+---------------------+
9 rows selected (0.244 seconds)
0: jdbc:drill:drillbit=localhost> SELECT * FROM nosqltest.test.zips
LIMIT 3;
+--------+----------+-------------------------+--------+--------+
| _id | city | loc | pop | state |
+--------+----------+-------------------------+--------+--------+
| 01001 | AGAWAM | [-72.622739,42.070206] | 15338 | MA |
| 01002 | CUSHMAN | [-72.51565,42.377017] | 36963 | MA |
| 01005 | BARRE | [-72.108354,42.409698] | 4546 | MA |
+--------+----------+-------------------------+--------+--------+
3 rows selected (0.325 seconds)
0: jdbc:drill:drillbit=localhost> !quit
```
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
datacli-0.1.3.tar.gz
(4.4 kB
view details)
File details
Details for the file datacli-0.1.3.tar.gz
.
File metadata
- Download URL: datacli-0.1.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7fd2bca73df8c325b149a9af67962caf6e2276236100cf9d716478dc5837e31 |
|
MD5 | 6a8b50b1b8eada6412023795d6ea57a8 |
|
BLAKE2b-256 | a32cf9ab4842b18954fa9702e5612d13d9b2e98892269213aeb961c23e25ee7d |