Why Kinesis Data Viewer is not seeing the data?

0

I have inserted some data into the kinesis stream and I can see it if I give the sequence number but not if I select Latest. Why? This statement from docs has me scratching my head: Latest: show records just after the most recent record in the shard, so that you always read the most recent data in the shard. How is there data after the MOST RECENT data? And why is it not showing the most recent data I inserted?

I am trying to follow this: https://aws.amazon.com/blogs/security/get-custom-data-into-amazon-security-lake-through-ingesting-azure-activity-logs/ Trim Horizon also is not showing data as given in this article.

  1. Why is the data not coming with Latest? Should i change anything in my putRecord api call for that?

It is currently just:

    response = kinesis_client.put_record(StreamARN=SECURITY_LAKE_AZURE_STREAM_ARN,
                Data=json.dumps(record),
                PartitionKey=“time”
                )
  1. To pick these data in a dataframe, what should I give in connection options? “startingPosition”: “earliest” is not fetching anything.

How it looks in data viewer: kinesisdata

Dataframe code:

    dataframe_KinesisStream_node1 = glueContext.create_data_frame.from_options(
        connection_type="kinesis",
        connection_options={
            "typeOfData": "kinesis",
            "streamARN": SECURITY_LAKE_AZURE_STREAM_ARN,
            "classification": "json",
            "startingPosition": "earliest",
            "inferSchema": "true",
        },
        transformation_ctx="dataframe_KinesisStream_node1",
    )
已提问 6 个月前819 查看次数
1 回答
1
  1. Latest will pick up record you add in the API after your streaming job is running and starting listening for new data since them (basically means "ignore history")
  2. "earliest" is Kafka configuration, the equivalent on Kinesis is TRIM_HORIZON
profile pictureAWS
专家
已回答 6 个月前
  • What connection_option for startingPosition should be given to fetch this data properly?

  • normally TRIM_HORIZON so you process the data you might have already there

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则