CAVI Model Database Export - HOWTO

Document created by DanielSweatman77140633 on Mar 15, 2016Last modified by MelissaPotvin on Mar 15, 2018
Version 3Show Document
  • View in full screen mode

Hi guys,


If you or your organisation needs to have a copy of the entire Model Database in CSV format you can follow these steps.


As root user, log onto your CAVI server.


This first command calls the postgres executable, connects to the VDC database, sets an output file name, sets a delimiter as a csv and removes the "table" style formatting.


#/usr/local/pgsql/bin/psql -d vdc_repos -o /tmp/vi_models.csv -F ',' -A


Once inside the database you can execute the following query:



FROM res.device_model mod

JOIN res.device_pline pline ON = mod.pline_id

JOIN res.device_type_en type ON mod.type_id =

JOIN res.device_vendor vendor ON = pline.vendor_id



Do not forget the ';' to finalise the query.


Type '\q' to exit.


You should now have a csv file in /tmp called vi_models.csv with the data listing of every model, their product line, vendor and device type attachment.


HI Daniel,


do you think that you can convert this post into a document (instead of a question)? if you cannot do it I can do it for you.

A document is a more suitable type for this kind of posts.





This document was generated from the following discussion: How To: CAVI Model Database Export