Attributes and Dimensions from Segments are empty values when retrieving data from Pinpoint API

1

I am trying to get the column and rows for customers from an AWS Pinpoint segment. To do so I used the boto3 SDK. Its my understanding from the docs that the get_segment method will contain the data for the segment in the attribute and dimension keys .When I try to load the attributes and dimension from an AWS Pinpoint segment using boto3 in an lambda function the dimensions and attributes show up as empty.

here is what my code looks like:

client = boto3.client('pinpoint',region_name='us-east-1')

response = client.get_segment(
        ApplicationId=appid,
        SegmentId=segment_id
    )
    
    print(response)

the response I am getting is this:

"SegmentResponse":{
      "ApplicationId":,
      "Arn":,
      "CreationDate":"2023-05-25T13:48:41.464Z",
      "Dimensions":{
         "Attributes":{
            
         },
         "Behavior":{
            
         },
         "Demographic":{
            
         },
         "Location":{
            
         },
         "UserAttributes":{
            
         }
      },
      "Id":,
      "LastModifiedDate":"2023-05-25T13:50:51.675Z",
      "Name":"test 1",
      "SegmentGroups":{
         "Groups":[
            {
               "Dimensions":[
                  {
                     "Attributes":{
                        
                     },
                     "Behavior":{
                        
                     },
                     "Demographic":{
                        
                     },
                     "Location":{
                        
                     },
                     "Metrics":{
                        
                     },
                     "UserAttributes":{
                        
                     }
                  }
               ],
               "SourceSegments":[
                  
               ],
               "SourceType":"ANY",
               "Type":"ANY"
            }
         ],
         "Include":"ALL"
      },
      "SegmentType":"DIMENSIONAL",
      "tags":{
         
      },
      "Version":3
   }

As you can see the dimensions and attributes are empty. When I create an export for the segment, the csv file populates properly and the correct data is given out with the correct format as well. The segment created is dynamic and uses the imported static segment as the base. If there is an error with the format then it wont take the csv file as an upload.

*ApplicationId, Id and Arn show up fine in the response. I took it off for security reasons.

When I tried pulling the data with the static up csv as the input, the Attributes and Dimension fields dont show up. I created another segment using the static segment as the base since the new segment would end up being dynamic. The dynamic segment then at least had the dimensions and attribute fields show up, but it is still empty.

已提問 1 年前檢視次數 302 次
2 個答案
0

https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-segments.html GetSegment doesn't give you the actual data but the segment definition

AWS
管理員
已回答 1 年前
  • Then how do I retrieve segment data / values from Pinpoint into Lambda ?

0

How can we retrieve segment details to leverage customer data within Amazon Connect? For instance, in our scenario, we aim to obtain the prompt ARN associated with a specific first name within the segment. This enables the delivery of personalized audio content in outbound campaigns within Amazon Connect via pinpoint journey.

已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南