From ddbd6787f552752b27193eb3fbde53cb036c9ec7 Mon Sep 17 00:00:00 2001 From: Golda Velez Date: Wed, 22 May 2024 01:27:11 -0700 Subject: [PATCH] get a sample of the data --- logs-to-tsdb/kinesis-lambda.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/logs-to-tsdb/kinesis-lambda.py b/logs-to-tsdb/kinesis-lambda.py index 71b29e6..cf9e949 100644 --- a/logs-to-tsdb/kinesis-lambda.py +++ b/logs-to-tsdb/kinesis-lambda.py @@ -5,6 +5,7 @@ import psycopg2.extras from base64 import b64decode from datetime import datetime, timezone +from pprint import pprint # Database connection parameters DB_HOST = os.environ['DB_HOST'] @@ -33,6 +34,7 @@ def handler(event, context): batched = [] for record in event['Records']: + pprint(record) # Decode the Kinesis data payload = b64decode(record['kinesis']['data']).decode('utf-8') data = json.loads(payload)