An open API service indexing awesome lists of open source software.

https://github.com/bjorg/csv2cb

CSV2CB is a command line tool to convert a CSV file into JSON document and upload them to a Couchbase bucket. Multiple CSV files can be uploaded to the same Couchbase bucket in a single invocation.
https://github.com/bjorg/csv2cb

Last synced: 9 months ago
JSON representation

CSV2CB is a command line tool to convert a CSV file into JSON document and upload them to a Couchbase bucket. Multiple CSV files can be uploaded to the same Couchbase bucket in a single invocation.

Awesome Lists containing this project

README

          

CSV2CB - Import CSV files into Couchbase
========================================

CSV2CB is a command line tool to convert a CSV file into JSON document and upload them to a
[Couchbase](http://www.couchbase.com/) bucket. Multiple CSV files can be uploaded to the same Couchbase
bucket in a single invocation.

Usage
-----

csv2cb --host=
[ --password= ]
[ --doctype= ]
[ --select= ]
...

Command Line Options
--------------------



--host=VALUE


Couchbase hostname with bucket name.

Example: --host=http://example.com:8091/bucket


--password=VALUE


(optional) Password for Couchbase bucket.


--doctype=VALUE


(optional) Document type identifier (doctype) to add to each converted JSON document.

Example: --doctype=customer


--select=VALUES


(optional) List of CSV columns to import. By default, all columns are imported.

Example: --select=id,name


-h, -?, --help


Shows the tool's help text.

Sample Invocation
-----------------

csv2cb --doctype=customer --select=id,name --host=http://example.com:8091/customers customers.csv

MindTouch CSV2CB - Import CSV files into Couchbase

Loading file 'customers.csv'...done (10,000 rows)
Converting rows...done (10,000 documents)
Importing documents...done (10,000 documents)

2.208 seconds elapsed (loading: 0.197s, converting: 0.253s, importing: 1.758s)
10,000 records loaded (50,816.132 records/second)
10,000 records converted (39,512.073 records/second)
10,000 records imported (5,689.450 records/second)

Requirements
------------
CSV2CB requires either .Net 3.5 or Mono 2.10 to run.

License
-------
Copyright 2013 MindTouch Inc.

Licensed 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](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.