/
createTableFromProductExtension
createTableFromProductExtension
def pxTableName = "Product_Costs" def pxAttrs = ["ProductID": "sku", "AvgCosts": "attribute1", "Supplier": "attribute3"] def inMemoryTableName = "TableAttrs" def fields = pxAttrs.values() def tableContext = api.getTableContext() tableContext.createTableFromProductExtension(inMemoryTableName, pxTableName, fields) def resultIterator = api.stream("PX", null, Filter.equal("name", pxTableName)) if (resultIterator) { tableContext.loadRows(inMemoryTableName, resultIterator) } api.trace("Tables", null, tableContext.printTablesDefinitions("%")) api.trace("Tables 1 Count", null, tableContext.count(inMemoryTableName))
, multiple selections available,
Related content
printTablesDefinitions
printTablesDefinitions
More like this
Groovy API Functions
Groovy API Functions
Read with this
Model Logic Key Methods
Model Logic Key Methods
More like this
How to Format Datamart Query Results
How to Format Datamart Query Results
Read with this
QueryAPI - Reference
QueryAPI - Reference
More like this
Datamart Join Sample Code
Datamart Join Sample Code
Read with this
Found an issue in documentation? Write to us.