I'm try to import json in the file to mongodb using pyspark after connection pyspark with mongodb, I'm using Ubuntu, my file in (file:///home/user/Downloads/newdb/hale.json) I write it like this ('home/user/Downloads/newdb/hale.json'),
I want to try using this code but in JSON
df = spark.read.csv(path = '/home/ahmad/Downloads/newdb/hale.csv', header=True, inferSchema=True)
??