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?
DX NetOps Spectrum all releases
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.
./show events -a mh=<model_handle> or lh=<landscape handle> > event_rpt
The 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.
echo "SELECT * FROM <table name>;" | mysql -uroot -proot <databasename> > <output file>.tsv
>echo "SELECT * FROM event;" | mysql -uroot -proot ddmdb > events_out.tsv
The outfile can be *.tsv, *.csv, or *.txt