title: How do you setup a Synapse Serverless SQL External Table over partitioned data?
body: <p>I have setup a Synapse workspace and imported the Covid19 sample data into a PySpark notebook.</p>
  <pre><code>blob_account_name = &quot;pandemicdatalake&quot;
  blob_container_name = &quot;public&quot;
  blob_relative_path = &quot;curated/covid-19/bing_covid-19_data/latest/bing_covid-19_data.parquet&quot;
  blob_sas_token = r&quot;&quot;
  # Allow SPARK to read from Blob remotely
  wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
  
  spark.conf.set(
      'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
      blob_sas_token)
  df = spark.read.parquet(wasbs_path)
  </code></pre>
  <p>I have then partitioned the data by country_region, and written it back down into my storage account.</p>
  <pre><code>df.write.partitionBy(&quot;country_region&quot;) /
      .mode(&quot;overwrite&quot;) /
      .parquet(&quot;abfss://rawdata@synapsepoc.dfs.core.windows.net/synapsepoc/Covid19/&quot;)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/QgiL2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QgiL2.png" alt="enter image description here" /></a></p>
  <p>All that works fine as you can see. So far I have only found a way to query data from the exact partition using OPENROWSET, like this...</p>
  <pre><code>SELECT
      TOP 100 *
  FROM
      OPENROWSET(
          BULK 'https://synapsepoc.dfs.core.windows.net/synapsepoc/Covid19/country_region=Afghanistan/**',
          FORMAT = 'PARQUET'
      ) AS [result]
  </code></pre>
  <p>I want to setup an Serverless SQL External table over the partition data, so that when people run a query and use &quot;WHERE country_region = x&quot; it will only read the appropriate partition. Is this possible, and if so how?</p>