databricks / LearningSparkV2

This is the github repo for Learning Spark: Lightning-Fast Data Analytics [2nd Edition]
https://learning.oreilly.com/library/view/learning-spark-2nd/9781492050032/
Apache License 2.0
1.2k stars 728 forks source link

IoT Devices Notebook (Scala) throws an `AnalysisException` on reading from Json and parsing as `DeviceIoTData` case class #69

Closed balath closed 3 years ago

balath commented 3 years ago

Firstly, I was trying the Dataset examples on my own but without being able to obtain a Dataset[DeviceIoTData] from the Json data. Then, I tried with the notebook imported from this repo and it kept failing again: imagen Where is my mistake? Thanks! ^^

brookewenig commented 3 years ago

Hey @balath! All the datasets located in databricks-datasets are accessible in Databricks Community Edition. Could you use this path instead /databricks-datasets/learning-spark-v2/iot-devices/iot_devices.json?

balath commented 3 years ago

Hi @brookewenig!! That path works! My downloaded json seems to have been corrupted while downloading or anything... From now on, I'll use that path for data. Lots of thanks!!! 💯 🤗