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",
    )
asked 6 months ago742 views
1 Answer
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
EXPERT
answered 6 months ago
  • 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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions