2 Answers
- Newest
- Most votes
- Most comments
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, )
answered a year ago
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)
answered a year ago
Relevant content
- asked 8 months ago
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago