The bulk_insert command does not work if it is used without a context manager, returns a value for the number of rows that were supposed to be inserted and does not throw an error:
Works:
with sql_cnxn as connection:
return_result = connection.bulk_insert(table_name, bulk_insert_data)
Does not work:
return_result = sql_cnxn.bulk_insert(table_name, bulk_insert_data)