noc csv-import – load data from CSV file
noc csv-import [options] <model> <path1> [ .. <pathN>]
Upload data from CSV files <path1> .. <pathN> to database model <model>
To see the list of available models, run
|--traceback||Print traceback on exception|
When loaded record is already exists in database do:
CSV file format
CSV file must be in UTF8, columns separated by commas (,). First row must contain field names, following rows contain records, one row per one record. Rows must be separated by newlines (\n).
To dereference foreign key use doubled underscore notation. i.e. to dereference foreign key user by username set user__username as field name.
To get a list of all available fields in model use
Display as list of models
Import file f1 to ip.address, fail if duplicated addresses found
Update ip.address from file f1