how to save spark dataframe in tfrecords format i tried but giving error


i am trying to save my spark dataframe in tfrecords format , but it’s give error.

here is my command ,


error message :

Py4JJavaError: An error occurred while calling
: java.lang.ClassNotFoundException: Failed to find data source: tfrecords. Please find packages at

spark version 2.4.5


You need to make sure that you run your Spark Job with the spark-tfrecord JAR . The GitHub repository provides some instructions on how to do that.

Answered By – Robert Kossendey

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published