Delimiter //
/**
 * Main contact is provided
 * 
 * @author Jean-François
 * @ticket #2113
 * @ticket #3907
 */
Drop Procedure If Exists LOADER_CONTACTS_NORMALIZE_MAP_MAIN_PROVIDED//
Create Procedure LOADER_CONTACTS_NORMALIZE_MAP_MAIN_PROVIDED(
    In batchnum Int
)
Begin

    Set @loader_type = GET_LOADER_INFO('LOADER_TYPE', batchnum);
    If  @loader_type = 'CONTACTS' Then
        Call LOADER_CONTACTS_NORMALIZE_MAP_MAIN_FROMCONTACT_PROVIDED(batchnum);
    ElseIf @loader_type = 'ACCOUNTS' Then
        Call LOADER_CONTACTS_NORMALIZE_MAP_MAIN_FROMACCOUNT_PROVIDED(batchnum);
    End If;

End//
Delimiter ;