title: import table data and save as json documents in adls gen2 using databricks
body: <p>I am using the below code to generate json resultset from a sql server table.</p>
  <p><strong>Powershell:</strong></p>
  <pre><code>$InstanceName = &quot;SQLTEST1\ENG_TST1&quot;
  $connectionString = &quot;Server=$InstanceName;Database=dbadb;Integrated Security=True;&quot;
  
  $query = &quot;SELECT * FROM dbo.sales&quot;
  
  $connection = New-Object System.Data.SqlClient.SqlConnection
  $connection.ConnectionString = $connectionString
  
  $connection.Open()
  $command = $connection.CreateCommand()
  $command.CommandText = $query
  
  $result = $command.ExecuteReader()
  
  $table = new-object &quot;System.Data.DataTable&quot;
  
  $table.Load($result)
  
  $table | select $table.Columns.ColumnName | ConvertTo-Json
  
  $connection.Close()
  </code></pre>
  <p>Could you please guide me to store json documents in Azure Data Lake Storage Gen2 using Azure Databricks.</p>