i have an entity called CustomerPurchasingHistory- with purchaseID,CustomerID(number), PurchaseItemInfo, PurchaseDate(Date).....etc.
Every field except PurchaseInfo is a single value.
PurchaseInfo stores a table of item purchased, and corresponding item quantity, and price. An example would be this:
PurchaseItemInfo
itemName, itemQuantity, itemTotalprice, discountApplied
bread 5 $20 yes
sugar 6 $20 yes
apple 5 $10 yes
towel 2 $15 no
........
i tried to concatenate all rows and columns in PurchaseItemInfoand make them stored as text
EG:
"bread,5,20,yes|sugar,6,20,yes|apple,5,10,yes|towel,2,15,yes|....."
this is saved to cds using patch func
but i cannot load it back to a collection format because split function only return table, and i cant retrieve the third item of the each row, not even talking about more fields in PurchaseItemInfo.
I just wonder what could i do to workaround this?
1. any functions/technique that can resolve this problem?
2. should i save PurchaseItemInfo as a seperate entity on cds and join it with CustomerPurchasingHistoryusing purchaseID and customerID? but would that be very slow if i am talking about 100 million records in PurchaseItemInfo because each customer can have many items purchased?

Report
All responses (
Answers (