title: Read json load to pyspark dataframe
body: <p>I want to ingest data from azure cosmos db, I am using the python sdk for connection in databricks.</p>
  <p>I want to be able to save my json.load(data) into a pyspark dataframe as I need to save the data in databricks delta lake, how can I read this data to pyspark dataframe. Below is my code and sample data</p>
  <pre class="lang-json prettyprint-override"><code>{
   &quot;appUuid&quot;: &quot;aaaa-bbbb-cccc&quot;,
   &quot;SystemId&quot;: null,
   &quot;city&quot;: &quot;Lancaster&quot;,
   &quot;state&quot;: &quot;NY&quot;,
   &quot;zipCode&quot;: &quot;140&quot;,
   &quot;field1&quot;: &quot;others&quot;,
   &quot;field2&quot;: &quot;others&quot;
  }
  {
   &quot;appUuid&quot;: &quot;bbbb-dddd-eeee&quot;,
   &quot;SystemId&quot;: null,
   &quot;city&quot;: &quot;Alden &quot;,
   &quot;state&quot;: &quot;NY&quot;,
   &quot;zipCode&quot;: &quot;140&quot;,
   &quot;field1&quot;: &quot;others&quot;,
   &quot;field2&quot;: &quot;others&quot;
  }
  </code></pre>
  <pre class="lang-py prettyprint-override"><code>from azure.cosmos import CosmosClient
  
  client = CosmosClient('https://&lt;cosmos_client&gt;.documents.azure.com:443/', credential='AccountKey')
  DATABASE_NAME = 'TestDB'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'Test'
  container = database.get_container_client(CONTAINER_NAME)
  
  import json
  for item in container.query_items(
           query='SELECT Top 10 * FROM Test',
          enable_cross_partition_query=True):
      data = json.dumps(item, indent=True)
      print(data)
      print(type(data))
  
  # converting string to json dict
  data1 = json.loads(data)
  print(data1)
  print(type(data1))
  
  
  from pyspark.sql import *
  from pyspark.sql import SparkSession,Row
  spark = SparkSession.builder.getOrCreate()
  
  df = spark.read.json(data1) -- I am getting error on this line.
  display(df)
  </code></pre>
  <p>I am getting this error:</p>
  <pre><code>&quot;IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: {&quot;
  </code></pre>