How to export all spectrum events

Document ID : KB000011647
Last Modified Date : 14/02/2018
Show Technical Document Details

In some cases, there may be a desire to export Spectrum Event data via CLI command line.


How can I export Event data via CLI?

Platform Independent

There are generally two ways to export event data from the DDM database.

First method is to use Spectrum CLI and send the event report to an out file. However, there is a limitation of maximum 10,000 events.

1.    1. Using a BASH shell, navigate to <SPECROOT>/vnmsh

2.    2. Type ./connect

3.    3. ./show events -a mh=<model_handle> or lh=<landscape handle> > event_rpt

Second method is to query the MySQL database and send the table data to an out file. There is no limitation on the query, but keep in mind that if viewing the data in Excel or another spreadsheet program, there may be a limit on the number of rows it can display. Some Event tables are too large to be imported into spreadsheet programs for view.

1.   1.  Using a BASH shell, navigate to <SPECROOT>/mysql/bin

2.   2.  Type echo "SELECT * FROM <table name>;" | mysql -uroot -proot <databasename> > <output file>.tsv

For example:

>echo "SELECT * FROM event;" | mysql -uroot -proot ddmdb > events_out.tsv 

The outfile can be *.tsv, *.csv, or *.txt

Additional Information: