Node utility to transform Excel spreadsheets into JSON for consumption into the Retrieve (SOLR) and Rank service on Bluemix.
x2sj is a component utility of the Watson Catalyst program.
You need to have node installed. Install it from here: http://nodejs.org
Install the package globally using npm. Note, on Linux or Mac you might need to include 'sudo' before the command
npm install x2sj -g
As the utility is stored globally, you may execute it like any other cli command:
% x2sj
Usage:
x2sj [OPTIONS] [ARGS]
Options:
-i, --file FILE An XLSX file to process
-o, --output FILE Output file in JSON format
-h, --help Display help and usage details
The utility operates on Excel Spreadsheets. The first column must be the operation to execute ('add', 'remove', etc). The rest of the column headers are taken to be valid attributes that will be added to the document in SOLR. If your SOLR schema does not contain a corresponding entry, then your JSON will fail to load:(
Example:
operation | id | curratedon | title |
---|---|---|---|
add | 1 | 20151030 | doc1 title part 1 |
add | 1 | 20151030 | doc1 title part 2 |
remove | 2 | 20141215 | doc100 |
The original author is Chris Madison.
Apache-2.0