Error while looking for metadata directory

textdata ="/user/kkgprest27288/myfirstfile.txt")
when I tried to run above command. I am getting following error message
20/06/12 07:10:53 WARN DataSource: Error while looking for metadata directory.

Hi @kkraj,

We have provided the instructions in the video to access hive in Spark. In short, you have to provide hive.xml environment variable to Spark. Can you please follow those configurations as suggested in the course video.


Which video are you referring ? Please let me know video link

@abhinav , @Shubh_Tripathi , @sandeepgiri - I am facing the same issue. Could you please provide the link to the video or instructions in this message chain.


Could you share the detailed steps to reproduce this error?

launch pyspark shell then below code -

df_orders = spark.readStream.format(“csv”)


df_all_orders = spark.sql(“select * from df_orders_file”)

order_stream = df_all_orders.writeStream

Any update here @sandeepgiri ?

Any update @sandeepgiri @Shubh_Tripathi

Hi Sanchit,

try this:

df_orders ='csv').option('path','input_folder').option('header','true').option('inferSchema','true').load()

Also, is there a particular reason of using readStream?
Note:- You can get more knowledge about these concepts at My courses