New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
saveToEs saves fields with NULL values #792
Comments
Do you have a data sample, it can be as simple as one, two entries/lines? It would help a lot in reproducing the problem and finding the bug. Thanks, |
It works as expected if I am writing existing JSON to ES
Result (mname field for person2 hasn't been created)
But it creates mname field with NULL value if I save a data frame.
Result (mname field for person2 has been created)
Thank you in advance! |
@ssemichev Thank you for the very clear breakdown of the problem! I was able to reproduce this locally very quickly and I am currently testing a fix for this issue. |
Issue description
I don't want to index fields with NULL values. It looks like a bug.
Original JSON document that I read from a file doesn't contain NULL values. A mapping doesn't use null_value also. After data loaded in data frame some fields like name.prefix, addresses.address2 are NULLs and these fields are created in ES index.
Partial result from ES
Steps to reproduce
Code:
parentsDF schema:
parentsDF sample - parentsDF.take(1)
Version Info
Hadoop/Spark: Spark 1.6
ES-Hadoop : 2.3.2
ES : 2.3.1
The text was updated successfully, but these errors were encountered: