Azure Databricks and Repo

Gopinath Rajee 656 Reputation points
2022-09-14T03:08:43.587+00:00

All,

We added a repo from our AzureDevOps by Cloning the repository. However, when I try to access the json file in the spark dataframe it is failing with the below errors:

Has anyone got this error before?

I'm able to access the files by running

%sh ls -l /Workspace/Repos/meta-data/json/CS.json

Update: Turns out that issue seems to be with loading json file since I'm able to csv load data.

240853-error.png

240843-repos.png

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
{count} votes

1 answer

Sort by: Most helpful
  1. Gopinath Rajee 656 Reputation points
    2022-09-16T02:30:34.633+00:00

    Don't know why but this is how it has to be read:

    **

    import os
    df = spark.read.option("multiline","true).json("file:/Workspace/Repos/metadata/json/CS.json)

    **

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.