नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
Partition transform function: A transform for timestamps and dates to partition data into days. Supports Spark Connect.
Warning
Deprecated in 4.0.0. Use partitioning.days instead.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.days(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target date or timestamp column to work on. |
Returns
pyspark.sql.Column: Data partitioned by days.
Examples
df.writeTo("catalog.db.table").partitionedBy(
days("ts")
).createOrReplace()
Note
This function can be used only in combination with the partitionedBy method of the DataFrameWriterV2.