# Map WFI Labels to Squirro

#### Source Codes

`ocbc-ecoffice/enrich/map_wfi_labels_to_squirro/map_wfi_labels_to_squirro.py`

#### Description

* Load Company Data Index, `/flash/octopus/cache/company_data_index.json`
* Map WFI labels to Squirro labels
    * `document_type_true`: `_MAPPINGS["<wfi_document_name>"]`
        * [`_MAPPINGS`](https://github.com/squirro/ocbc-ecoffice/blob/release/enrich/map_wfi_labels_to_squirro/map_wfi_labels_to_squirro.py#L17) are provided by OCBC
    * `document_date_true`: datetime string parse and format `<wfi_document_date>` from `%d-%b-%Y %H:%M:%S` to `%Y-%m-%d` (`Asia/Singapore` timezone)
    * `company_name_true`: [`<company_names>`]
        1. Search from Company Data Index for matching CIF, `<wfi_company_cif>`, &rarr; <b>(a)</b>
        2. `<company_names>`: List of values from the key, `company_name`, from individual entries in <b>(a)</b>
            * <b>NOTE:</b> It is possible that the property `company_name` may not exist in individual entries from <b>(a)</b>
