<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to get the size of selected rows in bytes using a single SQL query? in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/how-to-get-the-size-of-selected-rows-in-bytes-using-a-single-sql/m-p/109096#M1870</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a table named employee in Databricks. I ran the following query to filter out rows where the salary is greater than 25000.&lt;/P&gt;&lt;P&gt;This query returns 10 rows. I want to find the size of these 10 rows in &lt;STRONG&gt;bytes&lt;/STRONG&gt;, and I would like to calculate or retrieve this size only&amp;nbsp;&lt;STRONG&gt;within the same query&lt;/STRONG&gt;. How can I achieve this?&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2025 08:13:06 GMT</pubDate>
    <dc:creator>Akshay_Petkar</dc:creator>
    <dc:date>2025-02-06T08:13:06Z</dc:date>
    <item>
      <title>How to get the size of selected rows in bytes using a single SQL query?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-to-get-the-size-of-selected-rows-in-bytes-using-a-single-sql/m-p/109096#M1870</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a table named employee in Databricks. I ran the following query to filter out rows where the salary is greater than 25000.&lt;/P&gt;&lt;P&gt;This query returns 10 rows. I want to find the size of these 10 rows in &lt;STRONG&gt;bytes&lt;/STRONG&gt;, and I would like to calculate or retrieve this size only&amp;nbsp;&lt;STRONG&gt;within the same query&lt;/STRONG&gt;. How can I achieve this?&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 08:13:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-to-get-the-size-of-selected-rows-in-bytes-using-a-single-sql/m-p/109096#M1870</guid>
      <dc:creator>Akshay_Petkar</dc:creator>
      <dc:date>2025-02-06T08:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the size of selected rows in bytes using a single SQL query?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-to-get-the-size-of-selected-rows-in-bytes-using-a-single-sql/m-p/109303#M1874</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88335"&gt;@Akshay_Petkar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can try with this query:&lt;/P&gt;
&lt;P&gt;SELECT SUM(LENGTH(CAST(employee.* AS STRING))) AS total_size_in_bytes&lt;BR /&gt;FROM employee&lt;BR /&gt;WHERE salary &amp;gt; 25000;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 20:42:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-to-get-the-size-of-selected-rows-in-bytes-using-a-single-sql/m-p/109303#M1874</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2025-02-06T20:42:42Z</dc:date>
    </item>
  </channel>
</rss>

