snowflake.snowpark.functions.truncate¶

snowflake.snowpark.functions.truncate(width: Union[int, Column, str], col: Union[Column, str]) → Column[source]¶

Performs an Iceberg partition truncate transform. This function should only be used in the iceberg_config[‘partition_by’] parameter when creating Iceberg tables.

Example:

>>> iceberg_config = {
...     "external_volume": "example_volume",
...     "partition_by": [truncate(3, "a")]
... }
>>> df.write.save_as_table("my_table", iceberg_config=iceberg_config) 
Copy