Package net.pricefx.common.api.pa


package net.pricefx.common.api.pa
The field typing of Analytics data.

These two enums type the data a logic reads and writes in Analytics. FieldType is the business type of a field, as a Datamart or a Data Source declares it. DataType is the storage type behind a value, as a temporary table column declares it. The package name pa is historical. The module is called Analytics.


 // a temporary table, one DataType per column
 api.getTableContext().createTable("tmpProducts", ["ID": DataType.LONG, "Name": DataType.STRING], null)

 // an input that offers only the number and money fields of a Datamart
 api.inputBuilderFactory().createDMFields("MyInput", "DM.datamart_transaction")
         .setFieldTypes(FieldType.NUMBER, FieldType.MONEY)
 

DMField carries both. It reports the business type of the field, and the storage type the platform uses for the values.

Reference

  • FieldType selects the business type of an Analytics field, such as MONEY, QUANTITY or UOM.
  • DataType selects the storage type of a value, such as STRING, NUMBER or LONG.
  • Enum Classes
    Class
    Description
    The underlying storage/serialization primitive type of a value, lower-level than a Datamart FieldType, whose FieldType.toDataType() maps each field type down to one of these constants.
    The business/logical data type of a Datamart field, set with DMField.setType(FieldType).