title: Unable to read from Azure synapse using Databricks with master key error
body: <p>I am trying to read a dataframe from Azure Synapse DWH pool using the tutorial provided <a href="https://docs.databricks.com/data/data-sources/azure/synapse-analytics.html" rel="nofollow noreferrer">https://docs.databricks.com/data/data-sources/azure/synapse-analytics.html</a></p>
  <p>I have set the storage account access key &quot;fs.azure.account.key..blob.core.windows.net&quot; and also  specified the temp directory for ADLS in abfss format.</p>
  <p>The read operation is of the syntax:</p>
  <pre><code>x=spark.read.format('com.databricks.spark.sqldw').option('url',sqlDwUrl).option('tempDir',tempdir).option('forwardSparkAzureStorageCredentials', 'true').option('query',&quot;SELECT TOP(1)* FROM &quot;+ targetSchema + '.' + targetTable).load()
  </code></pre>
  <p>The above executes fine.</p>
  <p>And then I try to display the dataframe using</p>
  <pre><code>display(x)
  </code></pre>
  <p>,I run into the following error.</p>
  <pre><code>SqlDWSideException: Azure Synapse Analytics failed to execute the JDBC query produced by the connector.
  Underlying SQLException(s):
    - com.microsoft.sqlserver.jdbc.SQLServerException: Please create a master key in the database or open the master key in the session before performing this operation. [ErrorCode = 15581] [SQLState = S0006]
  </code></pre>
  <p>From the documentation ,I understand that a database master key is required, and that has been duly created. Therefore, I am not sure why this error is thrown.</p>
  <p>Surprisingly, write operations to Synapse using the format(df.write
  .format(&quot;com.databricks.spark.sqldw&quot;).....) work like a charm.</p>
  <p>I did some research,and based on that,I feel that database master key(this was created by DBA) is valid for both read as well as write operations.
  Is there any way by which a database master key would restrict read operations, but not write?
  If not, then why could the above issue be occuring?</p>