Description:
When uploading a pandas.DataFrame() that contains values of different types to elastic with eland.pandas_to_eland(), it returns a BulkIndexError without specifying why and where.
- The error `BulkIndexError: 1 document(s) failed to index.` lacks description of which documents failed to index and why. In datasets with many rows and columns (100k+), it is difficult to pinpoint the issue in order to fix it.
**Possible Cause:**
[Dequeue is currently used](https://github.com/elastic/eland/blob/aaec995b1bee3b74ef5e287253b71fd4ec457197/eland/etl.py#L215-L225) to perform bulk upload, which is preventing it from collecting error information on fails. [To retrieve error information](https://elasticsearch-py.readthedocs.io/en/stable/helpers.html), `for success, info in parallel_bulk(...):` is beneficial.
**Further Benefits:**
By enabling description on errors, all other errors that are not type mismatches will be displayed too. This will help users understand what the problem is and where it is coming from.
Description: When uploading a
pandas.DataFrame()
that contains values of different types to elastic witheland.pandas_to_eland()
, it returns a BulkIndexError without specifying why and where.Reproduction:
pip install elasticsearch eland pandas
True
and a textbar
.6 frames /usr/local/lib/python3.10/dist-packages/elasticsearch/helpers/actions.py in _process_bulk_chunk_success(resp, bulk_data, ignore_status, raise_on_error) 272 273 if errors: --> 274 raise BulkIndexError(f"{len(errors)} document(s) failed to index.", errors) 275 276
BulkIndexError: 1 document(s) failed to index.