A command line tool to ingest JSON records into CrateDB. For a more polished tool see cr8.
Create a table
>>> crash --hosts localhost:4200 -c "CREATE TABLE t (id int, name string)" CONNECT OK CREATE OK, 1 row affected (... sec)
Insert some JSON records:
>>> echo '{"id": 1, "name": "Trillian"}' | cr8ingest --table t --db-uri "host=localhost user=crate dbname=doc port=5432" Columns: [("id","integer"),("name","text")] Rate: Nothing Concurrency: 15 1 requests [op/s: ... avg duration: ... (ms)] <BLANKLINE>
Clone the repo and run:
$> stack install
stack must be installed.
$> stack test