2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
I got it working as Athena query in Glue:
database = "my_database" table = "my_table" sql_query = "CREATE TABLE ..." athena_client = boto3.client("athena") response = athena_client.start_query_execution( QueryExecutionContext={"Database": database, "Catalog": table}, QueryString=sql_query, )
답변함 일 년 전
0
Hello,
It appears the table DDL being used in the question is not natively supported in Glue, hence the error.
To create a iceberg table in Glue, you can try the below:
# Example: Create an Iceberg table from a DataFrame
# and register the table to Glue Data Catalog
dataFrame.createOrReplaceTempView("tmp_<your_table_name>")
query = f"""
CREATE TABLE glue_catalog.<your_database_name>.<your_table_name>
USING iceberg
AS SELECT * FROM tmp_<your_table_name>
"""
spark.sql(query)
답변함 일 년 전
관련 콘텐츠
- AWS 공식업데이트됨 5달 전
- AWS 공식업데이트됨 9달 전