Hi all,
I've run into issues with mapping inside the data prep tool, specifically within productListItems. The solution would need to be able to iterate through an array.
I am experiencing a dataset error where the Quantity is coming back as a string and not a number. I updated the code in my launch script so it would stop happening but am still getting this error about once a day. I tried using the following code within Data Prep Tool using a calculated field but it is still not working. My target field would productListItems[*].quantity but I cannot use that notation inside a calculated field because it does not accept [*].
Mapping Tried
Error message in datasets: #/productListItems/0/quantity: expected type: Number, found: String.
Sample Array:
[
{
"sku": "HGYU_89",
"name": "Wireless Mouse",
"pricetotal": 29.99,
"quantity": 2
},
{
"sku": "ABC_01",
"name": "Mechanical Keyboard",
"pricetotal": 89.95,
"quantity": 1
},
{
"sku": "XYZ_02",
"name": "USB-C Hub",
"pricetotal": 45.50,
"quantity": 3
}
]
Any assistance would be greatly appreciated!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @BReyes17 ,
In my opinion the best way to transform array fields is either on client side where developers can help you pass the right format or in Adobe Launch which seems you have already done. Data prep cannot transform the array fields as you cannot use them in calculated fields.
I think what you have built in Adobe Launch should be enough, 1-2 instances that you still see might be coming from old cached libraries on some user browsers which should clear out with time.
Cheers!
Hi @BReyes17 ,
In my opinion the best way to transform array fields is either on client side where developers can help you pass the right format or in Adobe Launch which seems you have already done. Data prep cannot transform the array fields as you cannot use them in calculated fields.
I think what you have built in Adobe Launch should be enough, 1-2 instances that you still see might be coming from old cached libraries on some user browsers which should clear out with time.
Cheers!
Views
Likes
Replies
Views
Likes
Replies