Skip to content

Instantly share code, notes, and snippets.

@tomquisel
Created November 18, 2015 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomquisel/5cb3278f792f591636e9 to your computer and use it in GitHub Desktop.
Save tomquisel/5cb3278f792f591636e9 to your computer and use it in GitHub Desktop.
Elasticsearch -> Spark dataframe
from pyspark.sql import SQLContext
sqlContext = SQLContext(sc)
df = sqlContext.read.format("org.elasticsearch.spark.sql").load("index/type")
df.printSchema()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment