Skip to content

RT_NumRows takes a raster column and returns a numeric value that represents the number of rows in the raster.

FunctionSyntax
Pythonnum_rows(raster_col)
SQLRT_NumRows(raster_col)
ScalanumRows(raster)

For more details, go to the GeoAnalytics for Microsoft Fabric API reference for num_rows.

Examples

PythonPythonSQLScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8

from geoanalytics_fabric.raster import functions as RT

data = [(list(range(100)), )]
df = spark.createDataFrame(data, ["pixels"]) \
     .withColumn("raster", RT.create_raster("pixels", 10, 10, "float32"))

df.select(RT.num_rows("raster").alias("num_rows")).show(truncate=False)
Result
Use dark colors for code blocksCopy
1
2
3
4
5
+--------+
|num_rows|
+--------+
|10      |
+--------+

Version table

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.