# Accounting Report Generation Check

## Overview

This will compare the generated AVRO files in S3 against the DynamoDB table that should have corresponding items. If the dynamo item is missing, it will print the entry that should be added.

The formatting script will read the output of that script and transform it into a format that can be imported by running:
> `aws dynamodb batch-write-item --request-items file://path-to-file.json`

## Running

Change `PERIOD_ID` and `USER_TYPE` depending on if you want monthly or quarterly entries by label or subaccount.

```sh
export PERIOD_ID=234
# or, for quarterly
export PERIOD_ID=234,235,236

export USER_TYPE=label
# or, for subaccounts
export USER_TYPE=subaccount
```

Generate a file of replacement Dynamo entries:
> `python find_missing_dynamo_items.py > a_file.txt`

Reformat the results to be importable via `batch-write-item`:
> `python format_dynamo_batch_import.py path/to/a/file.txt`
