Is it possible to query table names, number of rows and columns for all the tables inside Fabric Warehouse?
When I try to query Fabric Warehouse i cannot query count of rows together with number of columns. It returns 0 for number of rows
SELECT
t.name AS TableName,
SUM(p.rows) AS NumberOfRows,
COUNT(c.column_id) AS NumberOfColumns
FROM
sys.tables AS t
INNER JOIN
sys.columns AS c ON t.object_id = c.object_id
INNER JOIN
sys.partitions AS p ON t.object_id = p.object_id
WHERE
p.index_id IN (0, 1) -- 0:Heap, 1:Clustered index
GROUP BY
t.name
ORDER BY
t.name;
New contributor
user26556436 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.