spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chuwiey <ben.fona...@gmail.com>
Subject Re: Write to Parquet File in Python
Date Mon, 23 Mar 2015 18:19:38 GMT
Hey Akriti23,

pyspark gives you a saveAsParquetFile() api, to save your rdd as parquet.
You will however, need to infer the schema or describe it manually before
you can do so. Here are some docs about that (v1.2.1, you can search for the
others, they're relatively similar 1.1 and up): 
http://spark.apache.org/docs/1.2.1/sql-programming-guide.html#inferring-the-schema-using-reflection
http://spark.apache.org/docs/1.2.1/sql-programming-guide.html#parquet-files

As for whether it is the most efficient way to do a range query, that's a
more difficult question and it would be helpful if you could give some more
information. Another thing to think about is that you could just use a temp
table, and not store the parquet all together. <- same docs, just read
through them



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Write-to-Parquet-File-in-Python-tp22186p22191.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message