snowflake.snowpark.functions.bucket¶
- snowflake.snowpark.functions.bucket(num_buckets: Union[int, Column, str], col: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.43.0/src/snowflake/snowpark/functions.py#L4712-L4737)¶
Performs an Iceberg partition bucket 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": [bucket(10, "a")] ... } >>> df.write.save_as_table("my_table", iceberg_config=iceberg_config)