public interface DatamartContext
Modifier and Type | Interface and Description |
---|---|
static interface |
DatamartContext.Calendar
Helper class mainly, but not solely, for working with dates and time periods as used in the PA module.
|
static interface |
DatamartContext.DataLoader
API for DataFeed loading from a formula context.
|
static interface |
DatamartContext.DataSlice
A DataSlice defines a set of filters to be applied to a PA DataSet (Datamart, DataSource...).
|
static interface |
DatamartContext.Query
API for building a PA query in a formula context.
|
Modifier and Type | Method and Description |
---|---|
DMCalendar |
calendar()
Instantiate a PA Calendar utility object.
|
Table |
createDWTable(String tableName,
Table table) |
Table |
createDWTableFromCustomerExtension(String tableName,
String cxName) |
Table |
createDWTableFromCustomerMaster(String tableName) |
Table |
createDWTableFromLookupTable(String tableName,
Long tableLookupId) |
Table |
createDWTableFromProductExtension(String tableName,
String pxName) |
Table |
createDWTableFromProductMaster(String tableName) |
Table |
createDWTableFromQuery(String tableName,
DatamartContext.Query query) |
Object |
dimFilterEntry(String entryName,
Column column)
DimFilter input parameter: renders a selection of all possible values for the given dimension field, in the
FC which the column's table represents.
|
Object |
dimFilterEntry(String entryName,
Column column,
String defaultValue)
DimFilter input parameter: renders a selection of all possible values for the given dimension field, in the
FC which the column's table represents.
|
DatamartQueryResult |
executeQuery(DatamartContext.Query query)
Executes the given
DatamartContext.Query . |
Object |
fieldSelectionEntry(String entryName,
Table table,
String sType)
FC field selector, optionally limited to fields of a given type.
|
Object |
fieldSelectionEntry(String entryName,
Table table,
String sType,
Boolean multiple)
FC field selector, optionally limited to fields of a given type.
|
Table |
getDataFeed(String name)
Get a table object representing the DataFeed with the given name.
|
Table |
getDatamart(String name)
Get a table object representing the Datamart with the given name.
|
Table |
getDataSource(String name)
Get a table object representing the DataSource with the given name.
|
Table |
getDWTable(String name)
Get a table object representing the DWTable with the given name.
|
Table |
getFieldCollection(String sourceName)
Get a table object representing the FC with the given source name.
|
DatamartContext.DataLoader |
newDataLoader(Table feedTable)
Instantiate a new
DatamartContext.DataLoader to load rows with data for all the feed's attributes. |
DatamartContext.DataLoader |
newDataLoader(Table feedTable,
List<String> headerFieldNames)
Instantiate a new
DatamartContext.DataLoader to load rows with data for the named fields. |
DatamartContext.DataSlice |
newDatamartSlice()
Creates a new DatamartSlice, which allows for setting filter criteria along the Time, CustomerGroup, ProductGroup
any any other dimensions in a Datamart.
|
Object |
newDatamartSlice(String dateFieldName,
Object... timePeriodsAndProductAndCustomerGroups)
Creates a new DatamartSlice, which allows for setting filter criteria along the Time, CustomerGroup, ProductGroup
any any other dimensions in a Datamart, intiialized with the name of the time dimension field, and an optional set
filter criteria.
|
DatamartContext.Query |
newQuery(DatamartContext.Query otherQuery)
Create a new query from an existing one.
|
DatamartContext.Query |
newQuery(DatamartContext.Query query1,
DatamartContext.Query query2,
LinkedHashMap<String,String> joinFieldsMap) |
DatamartContext.Query |
newQuery(DatamartContext.Query query1,
DatamartContext.Query query2,
LinkedHashMap<String,String> joinFieldsMap,
boolean rollup) |
DatamartContext.Query |
newQuery(Table table) |
DatamartContext.Query |
newQuery(Table table,
boolean rollup)
Build a new query on the given table.
|
StreamResults |
streamQuery(DatamartContext.Query query)
Executes the given
DatamartContext.Query and return so that it can be examined one row at the time. |
DMCalendar calendar()
Calendar
Table getDataFeed(String name)
DatamartContext.Query
or DataFeedLoad}.name
- The sourceName, uniqueName or label of the DF.Table getDataSource(String name)
DatamartContext.Query
on that DataSource.name
- The sourceName, uniqueName or label of the DS.Table getDatamart(String name)
DatamartContext.Query
on that Datamart.name
- The sourceName, uniqueName or label of the DM.Table getDWTable(String name)
DatamartContext.Query
on that DWTablename
- The sourceName, uniqueName or label of the DWT.Table getFieldCollection(String sourceName)
DatamartContext.Query
on that FC.sourceName
- The sourceName of the FC.DatamartContext.Query newQuery(Table table)
table
- The table representing the FC to query.DatamartContext.Query
builder.DatamartContext.Query newQuery(Table table, boolean rollup)
table
- Represents the FC to query.rollup
- Line level or rollup query.DatamartContext.Query
builder.DatamartContext.Query newQuery(DatamartContext.Query otherQuery)
otherQuery
- Query to use as a basis for this new query.DatamartContext.Query
builder.DatamartContext.Query newQuery(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String,String> joinFieldsMap)
DatamartContext.Query newQuery(DatamartContext.Query query1, DatamartContext.Query query2, LinkedHashMap<String,String> joinFieldsMap, boolean rollup)
DatamartQueryResult executeQuery(DatamartContext.Query query)
DatamartContext.Query
. If for a rollup query the internal row limit, set by means the 'datamart.query.internalRowLimit' Price f(x) instance
param, is exceeded, then a null
is returned. The rationale for this behaviours is that a rollup, or so called analytical, query result
is unreliable if not all data in scope could be examined. This is different to a fetch, or paging, query, which can safely request one page at the time.query
- DatamartContext.Query
to execute.DatamartQueryResult
providing data in Matrix2D form and summary information in map form.StreamResults streamQuery(DatamartContext.Query query)
DatamartContext.Query
and return so that it can be examined one row at the time. This is different to executeQuery
, which
always return the full data set in scope of the query. When a row is retreived, and moved onwards from, it is no longer available to the client code.
The typical usage is to consume the result row by row, processing it into some accumulating data structure.query
- DatamartContext.Query
to execute.DatamartContext.DataSlice newDatamartSlice()
DatamartContext.DataSlice
object.Object newDatamartSlice(String dateFieldName, Object... timePeriodsAndProductAndCustomerGroups)
dateFieldName
- Name of the time dimension field.timePeriodsAndProductAndCustomerGroups
- TimePeriod, CustomerGroup, ProductGroup filters.DatamartContext.DataSlice
object.Object dimFilterEntry(String entryName, Column column)
entryName
- Input param name.column
- Columns from the table representing the FC to get a dimension field value from.Object dimFilterEntry(String entryName, Column column, String defaultValue)
entryName
- Input param name.column
- Columns from the table representing the FC to get a dimension field value from.defaultValue
- Value to use if no value has been selected yet.Object fieldSelectionEntry(String entryName, Table table, String sType)
entryName
- Input param name.table
- Table that represents the FC to select a field from.sType
- Type of the field to allow the user to select:
NUMBER
QUANTITY
TEXT
DATE
MONEY
CURRENCY
UOM
LOB
DATETIMEObject fieldSelectionEntry(String entryName, Table table, String sType, Boolean multiple)
entryName
- Input param name.table
- Table that represents the FC to select a field from.multiple
- Allow one field or multiple fields selection.Table createDWTable(String tableName, Table table)
Table createDWTableFromQuery(String tableName, DatamartContext.Query query)
Table createDWTableFromProductMaster(String tableName)
Table createDWTableFromCustomerMaster(String tableName)
Table createDWTableFromProductExtension(String tableName, String pxName)
Table createDWTableFromCustomerExtension(String tableName, String cxName)
Table createDWTableFromLookupTable(String tableName, Long tableLookupId)
DatamartContext.DataLoader newDataLoader(Table feedTable)
DatamartContext.DataLoader
to load rows with data for all the feed's attributes.feedTable
- Table representing the DataFeed to load data in.DataFeedLoad
instance providing an API to add (buffer) and flush (commit to the DB) rows to a DataFeed table.DatamartContext.DataLoader newDataLoader(Table feedTable, List<String> headerFieldNames)
DatamartContext.DataLoader
to load rows with data for the named fields.feedTable
- Table representing the DataFeed to load data in.headerFieldNames
- The fields for which values will be loaded. Defaults to all (persisted) fields in the DataFeed if not set.DataFeedLoad
instance providing an API to add (buffer) and flush (commit to the DB) rows to a DataFeed table.Copyright © 2016. All rights reserved.