TechTinkerer42 commented on issue #5721:
URL: https://github.com/apache/iceberg/issues/5721#issuecomment-1694941784
Here is an example of Pyspark code to register a bucketing UDF. @mrendi29, I
hope you have figured out your issue by now, but I'm sharing this in case it
helps someone else.
` # Register bucket UDF
jvm_gateway = spark.sparkContext._gateway.jvm
iceberg_spark = jvm_gateway.org.apache.iceberg.spark.IcebergSpark
data_types = jvm_gateway.org.apache.spark.sql.types.DataTypes
# 100 is the number of buckets
iceberg_spark.registerBucketUDF(spark._jsparkSession, "iceberg_bucket",
data_types.StringType, 100)
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]