0

I've tried to create a DELTA table in AWS(Athena) but I've got an error.

reference : https://docs.aws.amazon.com/athena/latest/ug/delta-lake-tables.html#delta-lake-tables-getting-started

CREATE EXTERNAL TABLE transformed_tables.test (
  col1    STRING      COMMENT '', 
  col2    STRING      COMMENT '' 
) 
LOCATION 's3://...../test/'
TBLPROPERTIES ('table_type' = 'DELTA')

It returns this error Athena error

Could you please help to resolve this error.

I need to create a DELTA table in Athena. It is a new feature in AWS that we can have a DELTA table in Athena.

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
Mali
  • 1
  • 1
  • "create table for delta lake tables only supports table properties and location clauses" **PLEASE** avoid use of images - why should we type it out for you? – Paul Maxwell May 18 '23 at 03:25
  • the `create externa; table` is required if not already in AWS Glue "*To be queryable, your Delta Lake table must exist in AWS Glue. If your table is in Amazon S3 but not in AWS Glue, run a CREATE EXTERNAL TABLE statement using the following syntax. If your table already exists in AWS Glue (for example, because you are using Apache Spark or another engine with AWS Glue), you can skip this step.*' could it already exist in AWS Glue? – Paul Maxwell May 18 '23 at 03:31
  • 1
    The error message suggests that you should skip the column definitions, possibly because the schema is supplied by the parquet files. – John Rotenstein May 18 '23 at 04:54

1 Answers1

0

Skip the column definition. As mentioned in the page you provided:

Note the omission of column definitions, SerDe library, and other table properties. Unlike traditional Hive tables, Delta Lake table metadata are inferred from the Delta Lake transaction log and synchronized directly to AWS Glue.

lsc
  • 235
  • 1
  • 9