title: read file from Azure Blob Storage into Azure SQL Database
body: <p>I have already tested this design using a local SQL Server Express set-up.</p>
  
  <p>I uploaded several .json files to Azure Storage
  In SQL Database, I created an External Data source:</p>
  
  <p><code>CREATE EXTERNAL DATA SOURCE MyAzureStorage
    WITH 
     (TYPE = BLOB_STORAGE,
      LOCATION = 'https://mydatafilestest.blob.core.windows.net/my_dir
      );</code></p>
  
  <p>Then I tried to query the file using my External Data Source:</p>
  
  <pre><code>select *
  from OPENROWSET
   (BULK 'my_test_doc.json', DATA_SOURCE = 'MyAzureStorage', SINGLE_CLOB) as data
  </code></pre>
  
  <p>However, this failed with the error message "Cannot bulk load. The file "prod_EnvBlow.json" does not exist or you don't have file access rights."</p>
  
  <p>Do I need to configure a DATABASE SCOPED CREDENTIAL to access the file storage, as described here?
  <a href="https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-scoped-credential-transact-sql" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-scoped-credential-transact-sql</a></p>
  
  <p>What else can anyone see that has gone wrong and I need to correct?</p>