Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. B2B transformation
  7. Aggregator transformation
  8. Cleanse transformation
  9. Data Masking transformation
  10. Data Services transformation
  11. Deduplicate transformation
  12. Expression transformation
  13. Filter transformation
  14. Hierarchy Builder transformation
  15. Hierarchy Parser transformation
  16. Hierarchy Processor transformation
  17. Input transformation
  18. Java transformation
  19. Java transformation API reference
  20. Joiner transformation
  21. Labeler transformation
  22. Lookup transformation
  23. Machine Learning transformation
  24. Mapplet transformation
  25. Normalizer transformation
  26. Output transformation
  27. Parse transformation
  28. Python transformation
  29. Rank transformation
  30. Router transformation
  31. Rule Specification transformation
  32. Sequence Generator transformation
  33. Sorter transformation
  34. SQL transformation
  35. Structure Parser transformation
  36. Transaction Control transformation
  37. Union transformation
  38. Velocity transformation
  39. Verifier transformation
  40. Web Services transformation

Transformations

Transformations

Step 3. Create an array of structs

Step 3. Create an array of structs

Continue to configure the output by adding the purchase order details in the items array of structs. Configure the data processing strategies to sort by item number, group by part number, and aggregate the incoming quantity and price.
Perform the following steps
  1. Add a new output field with the following properties:
    Property
    Value
    Child Of
    PurchaseOrder
    Name
    Items_arr
    Type
    array
    Array Element Type
    struct
    Element Struct Name
    item_str
  2. Add all the incoming fields from PODetail to the Items_arr array in the output group.
  3. Delete the following field that you do not need in the output group: PurchaseOrder.Items_arr.OrderNumber.
  4. Add a filter condition for the PurchaseOrder.Items_arr array:
    :fld.{PODetail.OrderNumber}=:fld.{PurchaseOrder.OrderNumber}
    .
  5. Configure a group by field for the PurchaseOrder.Items_arr array: PODetail.PartNum.
  6. Configure an order by field in ascending order for the PurchaseOrder.Items_arr array: PODetail.ItemNum.
  7. Update the field expression for PODetail.Quantity in the PurchaseOrder.Items_arr array:
    SUM(:fld.{PODetail.Quantity})
    to aggregate quantity.
  8. Update the field expression for PODetail.Price in the PurchaseOrder.Items_arr array:
    SUM(:fld.{PODetail.Price})
    to aggregate price.
The following image shows the data configuration icons and expressions for the Items_arr array in the output group.
The Items_arr output group on the right displays active icons for data sources, filter, group by, and order by. The Quantity and Price fields show the aggregate expressions.

0 COMMENTS

We’d like to hear from you!