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.

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
중재자
답변함 일 년 전
  • 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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠