-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Iceberg Partition Transforms #333
Comments
Hi, |
Hi @aiss93, It must be "months". See https://iceberg.apache.org/docs/latest/spark-ddl/#partitioned-by:~:text=Supported%20transformations%20are%3A |
These names are used in the older versions of iceberg. Check your iceberg version. The error message you're getting says that the function you're using wasn't found on the catalog. |
from my experience, it seems that the problem is with pyspark -
dbt-glue does not support this since it uses the same function in both order by and partition by. |
Hi guys, I managed to fix this by including extra jars in the glue session in order to use an advanced version of iceberg. You'll also need to include the aws bundle associated with the iceberg release you want to use. Finally in order to respect some iceberg expectations, you'll need to cluster your transformation by the field you're using in the partirion_by clause. So to summarize you need to change :
|
Hi guys,
It seems we are not able to use Iceberg Partition Transforms inside dbt models.
Table Config:
{{ config(
materialized='incremental',
incremental_strategy='append',
file_format='iceberg',
partition_by=['months(my_date)']
) }}
Output:
CREATE TABLE glue_catalog.test.test_table
USING iceberg
PARTITIONED BY (months(my_date))
LOCATION 's3://sandbox-source/client/my/test/test_table'
AS SELECT * FROM tmp_test_table ORDER BY (months(my_date))
Error: AnalysisException: Undefined function: months. This function is neither a built-in/temporary function, nor a persistent function that is qualified as spark_catalog.default.months.
I guess ORDER BY is the root cause since iceberg doesn't support such kind of partition expressions in ORDER BY clause.
dbt-glue/dbt/adapters/glue/impl.py
Lines 874 to 882 in a52fcc4
The text was updated successfully, but these errors were encountered: