# bulk-insert-label-participants

This script fixes relations between SME product and participants 
presented in Orchard Art Relations database.

## Tech design
### Given

#### Debugging

For debugging purposes config property DEBUG_PRODUCT_ID can be used.
If this propery is set then the script will process only this one product.

#### Input table
Table with UPCs to fix.  It should have at least on column name `upc`.

Sample table: `dev_engineering.etaranenko.TOO_MANY_PRIMARY_ARTISTS_ERROR`

The table will be processed in one run. 
If it is big it worth split it to smaller tables and use them one by one.

#### Steps
1. Save SNOWFLAKE_* and GRAPHQL* properties in .env
2. Save source table name to .env `SNOWFLAKE_SOURCE_TABLE`
3. Make sure `DEBUG_PRODUCT_ID` is empty in .env 
4. run `python bulk_fix_sme_product_participants.py`

