Jader Martins
Jader Martins

Reputation: 789

How limit number of lines read from a parquet file in sparklyr

I have a huge parquet file that dont fits in memory nor in disk when read, theres a way to use spark_read_parquet to only read the first n lines?

Upvotes: 4

Views: 1166

Answers (1)

Oldřich Spáčil
Oldřich Spáčil

Reputation: 156

This might be a hacky way, but

spark_read_parquet(..., memory=FALSE) %>% head(n)

seems to do the job for me.

Upvotes: 4

Related Questions