【发布时间】:2020-03-06 10:37:38
【问题描述】:
我有一个要导出到 Elasticsearch 的 SQL 表。
其中一列是可为空的数值字段,在某些记录中为空。
当我们尝试索引表时,我们得到这个错误:
One of the ETL (BigQuery -> ElasticSearch) jobs for Table : MLS has been ES Failed Chunk of 10000 from index 20000 possibly due to incompatible objects.
Failing BigQuery Table: MLS
Stack Trace of the error:
Traceback (most recent call last): File "/Users/asif/zodiacbackend/zodiacbackend/tasks.py", line 205, in insertIntoES helpers.bulk(es, doc_generator(dataframe,table)) File "/Users/asif/zodiacbackend/env/lib/python3.7/site-packages/elasticsearch/helpers/actions.py", line 300, in bulk for ok, item in streaming_bulk(client, actions, *args, **kwargs): File "/Users/asif/zodiacbackend/env/lib/python3.7/site-packages/elasticsearch/helpers/actions.py", line 230, in streaming_bulk **kwargs File "/Users/asif/zodiacbackend/env/lib/python3.7/site-packages/elasticsearch/helpers/actions.py", line 158, in _process_bulk_chunk raise BulkIndexError("%i document(s) failed to index." % len(errors), errors) elasticsearch.helpers.errors.BulkIndexError: ('2 document(s) failed to index.', [{'index': {'_index': 'mls', '_type': 'mls', '_id': 'b100qHABEFI45Lp-z3Om', 'status': 400, 'error': {'type': 'illegal_argument_exception', 'reason': 'mapper [Lot_Size_Sq_Ft] of different type, current_type [text], merged_type [long]'}, 'data': { 'Lot_Size_Sq_Ft': Decimal('13504')}}}])
如何让系统识别空值?
【问题讨论】:
-
你有没有机会看看我的答案,如果你需要任何澄清,请随时评论我的答案
-
我们现在正在处理它。我感谢你的耐心和智慧。我会尽快回复您。
-
好的,非常感谢更新:)
标签: elasticsearch null elasticsearch-query