Child pages
  • noc csv-export
Skip to end of metadata
Go to start of metadata


noc csv-export – dump data toCSV file


noc csv-export [options] <model>


Dump data from database model <model> to CSV file <path> to stdout

To see the list of available models, run

/opt/noc$ ./noc csv-export

without parameters




Verbosity level:

  • 0 - minimal output
  • 1 - normal output
  • 2 - all output
--tracebackPrint traceback on exception


Dump only header row, containing name of the fields

CSV file format

CSV file has UTF8, columns separated by commas (,). First row must contains field names, following rows contain records, one row per one record. Rows are separated by newlines (\n).

To referenceforeign key doubled underscore notationused. (i.e user__username used to reference foreign key user by username)

To get a list of all available fields in model without actual data us

/opt/noc$ ./noc csv-export --template <model>

which dumps exactly one row


Display as list of models

 /opt/noc$ ./noc csv-export 

Dump all ip.address model

/opt/noc$ ./noc csv-export ip.address

See Also

noc csv-import

  • No labels