Uses of Interface
net.pricefx.formulaengine.DatamartContext.Query
Package
Description
Provides Formula Engine API classes.
-
Uses of DatamartContext.Query in net.pricefx.formulaengine
Modifier and TypeMethodDescriptionModelFormulaContext.getSourceQuery()
Adds genericFilter
s to the query's HAVING clause.Parses and ANDs one or more SQL-like conditions to the query's HAVING clause.DatamartContext.newQuery
(DatamartContext.Query otherQuery) Creates a new query from an existing one.DatamartContext.newQuery
(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String, String> joinFieldsMap) Deprecated.DatamartContext.newQuery
(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String, String> joinFieldsMap, boolean rollup) Deprecated.DatamartContext.newQuery
(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String, String> joinFieldsMap, String joinMode, boolean rollup) Deprecated.DatamartContext.newQuery
(DatamartContext.Table table) Builds a new query on the given table.DatamartContext.newQuery
(DatamartContext.Table table, boolean rollup) Builds a new query on the given table allowing you to disable a rollup aggregation.DatamartContext.newQueryFromQueryFilterBuilder
(Map<String, Object> queryBuilderState, Map<String, Object> filterBuilderState) When combining aQuery Builder
and aQuery Filter
this method returns the selected source query with the filter already applied in thewhere(Filter...)
clause.Parses and adds one or more SQL-like conditions to the query's ORDER BY clause.Adds a projection to the query.Adds a projection to the query.DatamartContext.Query.selectAll()
Returns all columns.
Note: If the rollup is set to true (see theDatamartContext.newQuery(Table)
), then only columns matching the rollup aggregation will be returned.DatamartContext.Query.selectAll
(boolean fieldNameAsAlias) DatamartContext.Query.selectCount()
Adds a COUNT(*) projection to the query.DatamartContext.Query.selectDistinct()
Equivalent to the DISTINCT option in an SQL select statement.Projects the internal id of a row.DatamartContext.Query.setMaxRows
(Integer maxRows) Limits the number of rows returned in the query result.DatamartContext.Query.setOptions
(Map<String, Object> options) Allows for a number of query tweaking options, such as setting the target currency to convert to (if applicable) and requesting additional statistics to be calculated.DatamartContext.Query.setUseCache
(Boolean useCache) Allows to disable node level PA query caching just for this query.Adds genericFilter
s to the query's WHERE clause.Adds a condition to the query's WHERE clause.Parses and ANDs one or more SQL-like conditions to the query's WHERE clause.DatamartContext.Query.where
(CustomerGroup customerGroup) Adds a CustomerGroup condition to the query's WHERE clause, for example a customer group from an InputEntry("CustomerGroup") parameter.DatamartContext.Query.where
(ProductGroup productGroup) Adds a ProductGroup filter condition to the query's WHERE clause, for example a product group from an InputEntry("ProductGroup") parameter.DatamartContext.Query.where
(DatamartContext.DataSlice slice) Adds a condition to the query's WHERE clause.Modifier and TypeMethodDescriptionDatamartContext.newQueriesFromQueryBuilder
(Map<String, Object> builderState) Gets allQuery Builder
source series, ordered as configured in the UI (i.e. ordered as in the providedbuilderState
.Modifier and TypeMethodDescriptionDatamartContext.SqlQuery.addSource
(DatamartContext.Query sourceQuery) Adds aDatamartContext.Query
as a source for this SQL query.DatamartContext.SqlQuery.addSource
(DatamartContext.Query sourceQuery, String alias) Adds aDatamartContext.Query
as a source for this SQL query.ResultPAQuery
DatamartContext.buildQuery
(DatamartContext.Query query) EXPERIMENTAL: Not all aspects and properties of a query are supported.void
DatamartContext.consumeData
(DatamartContext.Query query, Closure<?> consumer) Deprecated.void
TableContext.createTableFromQuery
(String tableName, DatamartContext.Query query) Creates a new in-memory table - eventually dropping an already existing table with same name - based on the query definition fields.DatamartContext.executeQuery
(DatamartContext.Query query) Executes the givenDatamartContext.Query
.DatamartContext.newQuery
(DatamartContext.Query otherQuery) Creates a new query from an existing one.DatamartContext.newQuery
(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String, String> joinFieldsMap) Deprecated.DatamartContext.newQuery
(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String, String> joinFieldsMap, boolean rollup) Deprecated.DatamartContext.newQuery
(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String, String> joinFieldsMap, String joinMode, boolean rollup) Deprecated.DatamartContext.profileData
(DatamartContext.Query query) Calculates "Min", "Max", "#", "#Nulls", "#Distinct", "Sample" for dimension projections, and "Min", "Max", "Mean", "Std", "#", "#Nulls" for numeric projections.void
ModelFormulaContext.setSourceQuery
(DatamartContext.Query query) DatamartContext.streamQuery
(DatamartContext.Query query) Executes the givenDatamartContext.Query
and returns a result, so that one row at the time can be examined. -
Uses of DatamartContext.Query in net.pricefx.formulaengine.optimization
Modifier and TypeMethodDescriptionlong
ModelFormulaContextReadWrite.loadTable
(DatamartContext.Table table, DatamartContext.Query query, boolean truncate) Sample code:long
ModelParallelCalculationFormulaItemContext.loadTable
(DatamartContext.Table table, DatamartContext.Query query) Sample code:
DatamartContext.streamQuery(Query)
instead because of the limitation described above.