Skip to content
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

how to read flattened type field from elasticsearch using pyspark connector? #41

Open
amendhe opened this issue Jan 28, 2020 · 0 comments

Comments

@amendhe
Copy link

amendhe commented Jan 28, 2020

After reading index from elasticsearch using pyspark in databricks - All fields appeared but only one field which is a type of 'flattened'. Is there any option that i need to include during read. Following is my snippet to read from index.

spark.read.format("org.elasticsearch.spark.sql")\
      .option("es.nodes", ",".join(db['nodes']))\
      .option("es.mapping.date.rich", "false")\
      .option("es.net.http.auth.user", 'abc')\
      .option("es.net.http.auth.pass", '123abc')\
      .load('indexname')

elasticsearch: 7.5.1
spark: 2.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant