0
# =====================================================
# đź§Š Step 4. Write Data to Iceberg Table (Glue Catalog)
# =====================================================

table_name = "glue_catalog.cmt_test_db.iceberg_table"

(
    df.writeTo(table_name)
      .using("iceberg")
      .tableProperty("format-version", "2")
      .partitionedBy(
          col("city__pk1"),
          expr("bucket(3, `age__pk3`)"),
          expr("bucket(3, `id__pk2`)")
      )
      .createOrReplace()
)

print(f"âś… Iceberg table '{table_name}' created/loaded successfully!")
 

I am getting error **AnalysisException: Invalid partition transformation: bucket(3, age__pk3)
**
I am able to achieve it using AWS Athena SQL Editor. But I want to do it using Dataframe API!!

Please guide me. Thanks in advance!!

1 Answer 1

-1

It works fine using Polars, just use Polars instead. thx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.