Package net.pricefx.formulaengine
Interface DatamartQueryResult
public interface DatamartQueryResult
Provides access to a QueryResult in a formula context.
A query result may be obtained by
- executing a
Query
in the DatamartContext
- calling the DatamartQuery function, or equivalent SandboxAPI api.datamartQuery() - both deprecated!-
Method Summary
Modifier and TypeMethodDescriptionvoid
Calculates basic summary statistics on the query result data, and add it to the Summary map: Sum, Avg, Mean, Min, Max, Std and quantiles Q.05, Q.1, Q.2, Q.25, Q.4, Q.5, Q.6, Q.7, Q.75, Q.8, Q.8, Q.95.void
determineDistinctValues
(Collection<String> projAliases) Adds the set of distinct values for the specified projections to the Summary map, in summary.distinctValuesFor_. getData()
Retreives the query result data. .getDistinctValues
(String projAlias) Get the distinct values for a given projeciton.Additional query summary information,
-
Method Details
-
getData
Matrix2D getData()Retreives the query result data. .- Returns:
- The query result data in
Matrix
format. All data rows are included in this matrix. The matrix rows represent data rows, while the columns represent the query projections. Returnnull
if the maximum number of rows is exceeded. This max is set through Pricefx instance parameter 'datamart.query.externalRowsLimit', with a typical value of 100k rows.
-
getSummary
Map<String,Serializable> getSummary()Additional query summary information,- Returns:
- A map of maps with (key,value) pairs.
-
determineDistinctValues
Adds the set of distinct values for the specified projections to the Summary map, in summary.distinctValuesFor_. - Parameters:
projAliases
- The aliases of the projections to inspect
-
getDistinctValues
Get the distinct values for a given projeciton. Assumes determineDistinctValues has been run for projection.- Parameters:
projAlias
- Alias of a projection- Returns:
- Distinct values for that projection
-
calculateSummaryStatistics
void calculateSummaryStatistics()Calculates basic summary statistics on the query result data, and add it to the Summary map: Sum, Avg, Mean, Min, Max, Std and quantiles Q.05, Q.1, Q.2, Q.25, Q.4, Q.5, Q.6, Q.7, Q.75, Q.8, Q.8, Q.95.
-