spark.readStream.text() text file from adls gen2 in databricks
Sasidhar R. Kolli
20
Reputation points
file_path = "adl://<account-name>.dfs.core.windows.net/<container>/<path>/*.txt"
streaming_df = spark.readStream \
.schema(schema) \
.text(file_path)
query = streaming_df_transformed.writeStream \
.outputMode("append") \
.format("console") \
.start()
query.awaitTermination()
this is the code I'm using but when i read simple spark.read.text it is able to read my df but when I do spark.readStream.text() I'm able to read but when I do query it is throwing me error could not find adls gen2 token. Please provide me solution
Sign in to answer