dataset import COLLECTION_NAME CSV_FILENAME ID_COL_NUMER
dataset import GSHEET_ID_AND_SHEET_NAME ID_COLUMN_NO [CELL_RANGE]
import adds JSON documents to a collection from a CSV table.
In the following examples the CSV filename is data.csv. The first column (column 1) is used as the value for KEY if specified. Our collection is named “data.ds”.
dataset import data.ds data.csv 1
By default the header row of the table (the first row of the table) is used as the attribute names of the JSON document you create on import. If you don’t want that behavior you can use the “-use-header-row=false” option and the fields will be in the form of “column_NO” where “NO” is replaced with a left zero padded column number (e.g. column_001, column_002, column_003).
Related topics: export-csv, import-gsheet, export-gsheet