1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
Hello,
Yes, we can use CTAS with iceberg table.
You can refer to below AWS documentation and create table syntax.
- https://docs.aws.amazon.com/athena/latest/ug/ctas-examples.html#ctas-example-iceberg-parquet
- https://docs.aws.amazon.com/athena/latest/ug/ctas-examples.html#ctas-example-iceberg-avro
- https://docs.aws.amazon.com/athena/latest/ug/create-table-as.html#ctas-table-examples
- https://docs.aws.amazon.com/athena/latest/ug/ctas.html
Sample query:
CREATE TABLE ctas_iceberg_parquet WITH (table_type = 'ICEBERG', format = 'PARQUET', location = 's3://my_athena_results/ctas_iceberg_parquet/', is_external = false, partitioning = ARRAY['month(dt)'], vacuum_min_snapshots_to_keep = 10, vacuum_max_snapshot_age_ms = 259200 ) AS SELECT key1, name1, dt FROM table1;
Short answer is YES. To tell how more detail is required. Are you using Athena ? Trino ? Spark SQL ?