Re: Write to Parquet File in Python

2015-04-06 Thread Akriti23
Thank you so much for your reply.

We would like to provide a tool to the user to convert a binary file to a
file in Avro/Parquet format on his own computer. The tool will parse binary
file in python, and convert the data to Parquet. (BTW can we append to
parquet file). The issue is that we do not want the user to install spark on
his machine. Our converter is in python. How can we access Spark ? Is it
possible to include it as a jar library and access from our python code?

Any input will be useful,

Thanks




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

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



Re: Write to Parquet File in Python

2015-03-23 Thread chuwiey
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-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org