หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Important
Support for GEOGRAPHY values is in Public Preview. Support for GEOMETRY values is generally available.
Returns the input Geography or Geometry value in WKT format.
For the corresponding Databricks SQL function, see st_aswkt function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_aswkt(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A geospatial value, either a Geography or Geometry. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT Z (2.718281 3.141592 100)',)], ['wkt'])
df.select(dbf.st_aswkt(dbf.st_geogfromtext('wkt')).alias('result')).collect()
[Row(result='POINT Z (2.718281 3.141592 100)')]