How to Get the Size of Filtered Rows in Databricks SQL
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 12:14 AM
I have a query that filters rows from a table based on a timestamp range. The query is as follows:
SELECT COUNT(*) FROM table_name WHERE ts >= '2025-02-04 00:00:00' AND ts < '2025-02-05 00:00:00';
This query returns 10 rows. I need to calculate the total size (in bytes) of these 10 rows.
What is the best approach in Databricks SQL to get the exact size of these filtered rows?
is there a built-in function to get this information?