# bmi-set-project

This lambda creates / updates project information during a bulk metadata ingestion run. 

## Example Input Event
This input contains the location of the bucket/key for a JSON file, as transformed by the `bmi_convert_csv_to_json` lambda.

```
{
    'key': 'parsed_csv/ALL_DDEX_TO_CSV_2023-02-10_2023-03-01.json'
    'bucket': 'prod-orcd-fluve-drop',
    'item_index': '7892920191004_____1362655',
    'execution_name': 'exec-1234',
    'state_machine_name': 'sfn-bulk-metadata-ingester',
    'correlation_id': 'lvona-1234'
}
```

## Example Output
```
{
    "key": "parsed_csv/ALL_DDEX_TO_CSV_2023-02-10_2023-03-01.json",
    "bucket": "prod-orcd-fluve-drop",
    "item_index": "7892920191004_____1362655",
    "execution_name": "exec-1234",
    "state_machine_name": "sfn-bulk-metadata-ingester",
    "correlation_id": "lvona-1234",
    "release":
    {
        "subaccount_id": 0,
        "project_artist_id": "2991910",
        "participants":
        [
            {
                "name": "Pedro Libe, Jorge & Mateus",
                "artist_id": "2991910",
                "label_participant_id": "1680562139953",
                "label_participant_uuid": "b3c44c3c-e3e7-47d7-a379-516dd22a1550"
            },
            {
                "name": "Pedro Libe",
                "artist_id": "2991911",
                "label_participant_id": "1680562140543",
                "label_participant_uuid": "46ea4ddd-6dee-40d8-af20-8354cb59c632"
            },
            {
                "name": "Jorge & Mateus",
                "artist_id": "2991912",
                "label_participant_id": "1680562140988",
                "label_participant_uuid": "82bcde37-2362-4abc-a482-c90c3dbe2859"
            },
            {
                "name": "Seu Jonas",
                "artist_id": "2991913",
                "label_participant_id": "1680562141433",
                "label_participant_uuid": "ed81e443-f660-46d6-aed4-679e7c3a2af1"
            },
            {
                "name": "Alex Alves",
                "artist_id": "2991914",
                "label_participant_id": "1680562141893",
                "label_participant_uuid": "c81f2f22-24a1-4eb9-8de4-f1849c211b57"
            },
            {
                "name": "Robson Lima",
                "artist_id": "2991915",
                "label_participant_id": "1680562142329",
                "label_participant_uuid": "b38a59ef-dbbe-46a4-ae03-bc00d13dd999"
            },
            {
                "name": "Lucas Papada",
                "artist_id": "2991916",
                "label_participant_id": "1680562142839",
                "label_participant_uuid": "667a99f9-1e19-40e8-89bf-ea410434bb7c"
            }
        ],
        "project_id": 5451759
    },
    "tracks":
    {}
}
```
