내 커뮤니티 업적 표시줄을 확대합니다.

Adobe Experience Platform (AEP) & Apps User Groups are live to Network, learn, and share in your regional locations.
해결됨

How do we write a query for an array function within a struct to retrieve particular records from an array of objects?

Avatar

Level 2

How do we employ an array function within a struct to retrieve particular records from an array of objects?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

Hi @BellaSnow5378 ,

 

You can achieve this by using an Inline Function, sample query is mentioned below:

SELECT inline(array(struct(1, 'a'), struct(2, 'b'))), 'AAA';

https://experienceleague.adobe.com/en/docs/experience-platform/query/sql/syntax#inline
For more details on higher-order functions follow the link below:

https://experienceleague.adobe.com/en/docs/experience-platform/query/sql/higher-order-functions

 

Regards,

Kumar Saurabh

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Employee

Hi @BellaSnow5378 ,

 

You can achieve this by using an Inline Function, sample query is mentioned below:

SELECT inline(array(struct(1, 'a'), struct(2, 'b'))), 'AAA';

https://experienceleague.adobe.com/en/docs/experience-platform/query/sql/syntax#inline
For more details on higher-order functions follow the link below:

https://experienceleague.adobe.com/en/docs/experience-platform/query/sql/higher-order-functions

 

Regards,

Kumar Saurabh