Databricks spark.readstream format differences

Viewed 469

I am having confusion on the difference of the following code in Databricks

spark.readStream.format('json')

vs

spark.readStream.format('cloudfiles').option('cloudFiles.format', 'json')

I know cloudfiles as the format would be regarded as Databricks Autoloader . In performance/function comparison , which one is better ? Anyone has some experience on that?

Thanks

1 Answers

There are multiple differences between these two. When you use Auto Loader you get at least, there are more things (see doc for all details):

Related