Why is it not possible to query Integer column?


Why can't I query a column "ColumnNumber" if it is set as Integer in Data Source? I need to aggregate by the first 4 columns, so I set the rollup to true. The first 4 columns are keys in the Data Source.

def dmCtx = api.getDatamartContext() def ds = dmCtx.getDataSource("SalesHistory") def query = dmCtx.newQuery(ds, true) query.maxRows = 20 query.select("Article") query.select("SalesOrg") query.select("BillingDocument") query.select("BillingItem") //query.select("ColumnNumber") // << Doesn't work: ColumnNumber is Integer query.select("SoldTo") // << Works: SoldTo is Text query.select("SUM(GrossSales)", "GrossSales")

"ColumnNumber" is filled in the Data Source.


It is because in Pricefx numeric types (Integer, Quantity, Money) are not considered as types that you can group by. You can either change the column type to Text in the Data Source or create a Datamart with an expression column that casts the Integer column to Text.

Found an issue in documentation? Write to us.