Kinesis Neo4J sync event generator
===============

This script allows for the generation of synthetic Kinesis events for use with
the [lambda-kinesis-to-neo4j-invoke-with-payload](https://scheduler.theorchard.io/job/lambda-kinesis-to-neo4j-invoke-with-payload/)
Jenkins job.

Getting Started
---------------

## Installation

Standard python installation:

```
python -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
```

## Running

Copy .env.sample to .env and fill in the env variables. It is recommended to
use reportsar02 to ensure you are creating an up-to-date event.

You can then run the script with a table name and any number of PKs for that
table to generate synthetic kinesis events:

```
$ python index.py track_writer 12345 12346
```

This will fetch the specified rows from art relations and output one event for
every PK. The base64 encoded version is also produced which can be directly
plugged in to the Jenkins job.

## Common scenarios

If you are working through one of the scenarios below for Distro Support, please give a list of all the entities (Table name and ids) to the #project-trinity slack channel for investigation of the underlying causes.

Refer: https://www.notion.so/Metadata-could-not-be-generated-for-this-product-2ef772dbc46e4c80a1432ae02c601d8d?pvs=4#bdd769f47450434ca778ea2e67900aa7

