-
Notifications
You must be signed in to change notification settings - Fork 57
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
Creating Iceberg tables via CloudFormation without using the Athena API #1827
Comments
@dmschauer Does the following chunk of CloudFormation code from https://aws.amazon.com/blogs/big-data/introducing-aws-glue-crawler-and-create-table-support-for-apache-iceberg-format/ solves the issue for you? OpenTableFormatInput: |
@milashenko Thanks for the reply, do you know how to specify this in AWS CDK? So far in our project we only use the CDK to specify CF templates |
@dmschauer Didn't try myself, but this looks like the one https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnTable.OpenTableFormatInputProperty.html |
Hi @milashenko thanks for the reply. This didn't help directly in our case as we're using AWS CDK to generate the CF templates, but it gave me hope that CF actually does support Iceberg tables and it does! My bad! This issue can be closed. For anyone else wondering and stumbling upon this issue, the below AWS CDK (Python) code can be used to construct Iceberg tables via CloudFormation without the need for any weird workarounds. The trick is specifying the
|
Closing issue, can create Iceberg tables via CF. |
Hi @milashenko , could you please assist in creating iceberg table with partitions?
during CF stack deploy I got:
|
@oleksiiburov Unfortunately I also was unable to add partitions as part of the template. Only later with Athena Spark notebook like:
More can fe found here https://iceberg.apache.org/docs/latest/spark-ddl/#partitioned-by |
Hi @dmschauer. I think the issue with Iceberg tables in CDK is not totally solved, as for now the only allowed metadata operation is CREATE (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-iceberginput.html). It would still be necessary to run queries in Athena if you want to add columns, change column or table names, so all the operations can't be managed through AWS CDK |
@sfgarcia I'm aware of that. This issue I opened here is merely about support for CREATE being in place at all and as it turned out it is (although partitioning via CloudFormation isn't supported, that's a separate issue #1866) Regarding the actual problem, someone else also already opened another issue about updates to Iceberg tables not being supported by Cloudformation. I see coincidentally both of us have been tagged there (#1919 (comment)) |
So far you can do like this to create an Iceberg table
|
Name of the resource
AWS::Glue::Table
Resource name
No response
Description
Iceberg format has been available in Athena for 1 year now, but Cloudformation still hasn't supported the creation of an Iceberg table (https://aws.amazon.com/about-aws/whats-new/2022/04/amazon-athena-acid-transactions-powered-apache-iceberg/). To create an Iceberg table the only available option is to run a DDL query directly in Athena (https://docs.aws.amazon.com/athena/latest/ug/querying-iceberg-creating-tables.html) which is not very convenient in large production environments where all cloud infrastructure is mantained in Cloudformation.
This issue #1595 already pointed out the same but unfortunately it was closed without an actual solution being implemented.
Please take a look at this response #1595 (comment) which was liked by at least 7 others as well who are still facing the original problem.
There is still no direct Cloudformation support for creating Iceberg tables and you have to go via the Athena API route which is inconvenient and unexpected.
Other Details
We are working with AWS CDK to generate our CloudFormation specifications. As a workaround we are currently doing the following: using a CustomResource that calls a Lambda Function that calls the Athena API to execute an Iceberg CREATE TABLE statement. We don't consider this a long-term solution though and only as a workaround until support was added to CloudFormation
The text was updated successfully, but these errors were encountered: