title: Azure Synapse Serverless. HashBytes: The query references an object that is not supported in distributed processing mode
body: <p>I am receiving the error &quot;The query references an object that is not supported in distributed processing mode&quot; when using the HASHBYTES() function to hash rows in Synapse Serverless SQL Pool.</p>
  <p>The end goal is to parse the json and store it as parquet along with a hash of the json document.  The hash will be used in future imports of new snapshots to identify differentials.</p>
  <p>Here is a sample query that produces the error:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT HASHBYTES('sha2_256', csvdata.rec)
  FROM OPENROWSET(
          BULK 'json/*/*/*/*/*.json.gz',
          DATA_SOURCE = 'landingzone',
          FORMAT = 'csv',
          fieldterminator ='0x0b',
          fieldquote = '0x0b'
  ) with (rec nvarchar(max)) as csvdata;
  </code></pre>
  <p>This example also produces the error:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT HASHBYTES('sha2_256', '{&quot;mydoc&quot;: {&quot;key&quot;:&quot;value&quot;}}')
  FROM OPENROWSET(
          BULK 'json/*/*/*/*/*.json.gz',
          DATA_SOURCE = 'landingzone',
          FORMAT = 'csv',
          fieldterminator ='0x0b',
          fieldquote = '0x0b'
  ) with (rec nvarchar(max)) as csvdata;
  </code></pre>
  <p>This example produces a hash as expected:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT HASHBYTES('sha2_256', '{&quot;mydoc&quot;: {&quot;key&quot;:&quot;value&quot;}}');
  </code></pre>
  <p>I also receive the error if I first create an external table and use the hashbytes() function when querying from the external table.</p>
  <p>Thank you in advance for your advice.</p>