コミュニティアチーブメントバーを展開する。

Adobe Experience Platform (AEP) & Apps User Groups are live to Network, learn, and share in your regional locations.
解決済み

Data Prep UI - Calculated Fields - Map JSON array of objects into XDM map structure

Avatar

Community Advisor and Adobe Champion

Hey guys,
just a quick question: in a calculated field, has anyone applied an AEP data prep in the UI which transforms an incoming array of JSON objects into a new map/object structure like below?
array_to_map(items, "id") seems to only generate an object structure that gives little control over what the target structure.

Are there no "real" array functions in the source data prep? Destinations however seem to support a lot more functions like transformArray, filterArray, ....

https://experienceleague.adobe.com/en/docs/experience-platform/data-prep/functions#special-operation...

 

Source structure:

{
  "items": [{
    "id": "12345",
    "hello": "foo",
    "bla": "blub"
  },{
    "id": "26480",
    "hello": "bar",
    "bla": "something else"
  }]
}

 

Target object structure:

{
  "12345_foo": {
    "id": "12345",
    "hello": "foo"
  },
  "26480_bar": {
    "id": "26480",
    "hello": "bar"
  }
}

 Thx for any input!

Cheers from Switzerland!


トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hello @bjoern__koth I would recommend to generate payload of requirement form upstream rather than relaying on data prep for a such contract change. 

 

 

~cheers,

NN.

元の投稿で解決策を見る

4 返信

Avatar

Community Advisor

Avatar

Community Advisor and Adobe Champion

Hi @nnakirikanti 

I need this for calculated fields where the asterisk notation is not supported.

In terms of mapping sets, is this an API-only feature? By any chance, would you have an example that could work for my above transformation?

Cheers from Switzerland!


Avatar

正解者
Community Advisor

Hello @bjoern__koth I would recommend to generate payload of requirement form upstream rather than relaying on data prep for a such contract change. 

 

 

~cheers,

NN.

Avatar

Community Advisor and Adobe Champion

Thx @nnakirikanti , this is likely the way it has to be done. Still feel like this puts a lot of effort on the data providing side whereas this could be easily done on AEP side. Downside of the AEP side approach mightly be performance though.

Cheers from Switzerland!