Some dbWatch command line commands outputs table data. These commands have a parameter -format <> which lets you specify the output format of the command. The -format parameter refers to a set of user defined formats stored in the <>/.dbwatch/formats/ folder. The ability to specify the output format of the dbw command gives the user greater flexibility when using dbwatch with other tools.

The .format file

The format of the format specifications uses the java property file syntax. It defines the properties of a given format.
The properties available are:

#The name of the format.
name=

#These patterns are printed at the beginning and at the end of the produced document.
doc.begin=
doc.end=

#This pattern is printed after each line.
doc.line.seperator=

#The pattern formats one row.
#If this property is defined all other properties starting with "row." or "cell." are ignored.
row.full=

#This pattern is printed before and after each row of input.
row.begin=
row.end=

#This pattern is printed before and after each cell.
cell.begin=
cell.end=

#This pattern is printed as the cell body.
cell.body=

The patterns are evaluated by replacing certain patterns with the value of the current cell/row/document. The following table describes which properties are available and in which pattern.

Property Available in
{$column} All patterns
{$n/column}, {$n/data} row.full
{$column}, {$data} cell.begin, cell.end, cell.body

← Register service grouping format / Command line configuration →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment