Skip to content

Commit

Permalink
get a sample of the data
Browse files Browse the repository at this point in the history
  • Loading branch information
gvelez17 committed May 22, 2024
1 parent 9711d29 commit ddbd678
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions logs-to-tsdb/kinesis-lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ddbd678

Please sign in to comment.