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, )
已回答 1 年前
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)
已回答 1 年前
相關內容
- AWS 官方已更新 1 年前