PivotData is a command line utility that aggregates data from CSV/TSV file or SQL database and
generates pretty pivot table reports (HTML/Excel/CSV/PDF) without OLAP server or Excel.
It it good for automated and scheduled crosstab reports generation.
Pivotdata tool usage doesn't need any programming skills.

Installation

Windows: special installation procedure is not needed; pivotdata.exe is a .NET console utility that requires Microsoft .NET Framework 4.0 (or higher). In most cases it is already installed if you have Win7SP1/Win8.

Linux/MacOS: please contact us if you interested in PivotData Tool version for these platforms

aggregate data returned by SELECT using MSSQL/AzureSQL (mssql) or ODBC (odbc) driver.
Cube configuration -p {pivot_data_cube_config_json} is required for this input handler.
{db_source_options_json} is a JSON object with DB reader settings:

where 'create_date' is a column that should be parsed as DateTime value.
List of supported mapping handlers:

{Type:'datetime'}

Parses input string as DateTime value

{Type:'integer'}

Parses input string as integer value

{Type:'double'}

Parses input string as floating-point value

{Type:'decimal'}

Parses input string as decimal value

{Type:'format',Params:['Year: {0}', 'year_column_name' ]}

Formats string value; first parameter is a format specifier (acceptable by
.NET String.Format)
and rest of parameters are column names used for getting format arguments. It is possible to use more than 1 argument.

Load input data as pre-grouped cube datapoints. This option is not applicable with '-i cubefile'.
<count field name> identifies a column with count aggregate value (required).
Each input row should unique define value key and aggregated value. This option is useful for
aggregating cube data on DB side with GROUP BY:

compose compressed cube package (.zip file) and upload it to the specified HTTP endpoint. {config_json} is a JSON object with
the following settings:

Name

Unique cube name (used as file name for zip package)

UploadUrl

HTTP or HTTPS endpoint URL

Username

HTTP Basic Authentication username (optional)

Password

HTTP Basic Authentication password (optional)

-o getvalue {value_key_json}

write aggregated value for specified dimension keys to stdout. {value_key_json} is a JSON array of dimension keys, for example:

pivotdata -i {input_source_options} -o getvalue "[2007,5]"

Totals value can be obtained by specifying 'null' key for some or all dimensions. Example of getting grand total value:

pivotdata -i {input_source_options} -o getvalue "[null,null]"

-o pivottablehtml <output_file>

generate pivot table report and render it as HTML table.
Pivot table configuration (-t option) is required for this output handler.
<output_file> is a path to local file or "-" (write to stdout)
Example:

Licensing Conditions

PivotData Tool can be used for FREE by end-users and inside companies for internal business purposes (like server-side automations).
If you want to externally redistribute it as part of your own solution/product (ISV) you need
to purchase a commercial license.