- Newest
- Most votes
- Most comments
- Check Glue Table Metadata
- Go to the Glue Console → Databases → your table.
- Look closely at column types, partition keys, and table properties.
- If anything looks off (like missing types or broken partition info), it can trigger this error.
- Recreate the Table Manually
- If you're able to read the raw files (you mentioned DuckDB works), consider re-creating the table using a fresh CREATE EXTERNAL TABLE statement pointing to the same S3 location.
- Query Specific Files
- You can try this to isolate if a particular file is breaking it:
SELECT * FROM your_table WHERE "$path" = 's3://your-bucket/path/to/file.parquet'
- MSCK REPAIR TABLE
- If it's a partitioned table, run: ---> MSCK REPAIR TABLE your_table;
- This helps refresh the metadata and often fixes weird Glue desync issues.
answered a year ago
It's an S3 Table Bucket, how can I query individual files?
There is no table in my glue dashboard, not a single one. I have created the table with
aws s3tables create-table --cli-input-json file://./iceberg/${TABLE_NAME}.json | jq
Since you're using aws s3tables create-table and see no table in Glue:
-
Try Re-Creating the Table Using DDL (instead of CLI-generated JSON) Try manually creating the table with CREATE TABLE in Athena or using the Iceberg connector
-
Check Raw S3 Data Manually If DuckDB can read it, try to download and inspect the first few files using Python or aws s3 cp: aws s3 cp s3://your-bucket/path/file.parquet . Then validate the schema with parquet-tools schema or DuckDB’s CLI: SELECT * FROM 'file.parquet' LIMIT 10; Look for null values in numeric fields.
-
Use $path Filtering in Athena to Isolate the Failing File If your Iceberg or S3 table supports it: SELECT * FROM default.simple WHERE "$path" = 's3://your-bucket/path/to/specific/file.parquet'; This helps identify which file is problematic, especially useful for large datasets.
-
Enable Glue Catalog Integration (Optional) Even though you’re using s3tables, consider registering the table in Glue. This gives Athena more context: aws glue create-table --database-name mydb --table-input file://table-def.json Or use MSCK REPAIR TABLE if the table is already in Glue and partitioned.
answered a year ago
The error you're encountering when trying to delete data from an S3 table via Athena is likely due to a compatibility issue or missing permissions.
S3 Tables is a relatively new feature, and there are a few things to check:
-
Make sure you're using the latest version of the AWS CLI. S3 Tables were recently announced, and older CLI versions don't support them properly.
-
Check that you have the necessary permissions. S3 Tables integrate with AWS Lake Formation for access control, which requires specific permissions to be granted even if you're an administrator in the AWS account.
-
Verify that you're using the correct catalog when querying. S3 Tables use a separate catalog from the default AWS Glue Data Catalog, and you may need to specify the S3 Tables catalog explicitly in your Athena query.
-
Ensure you've registered the S3 table bucket catalog as a data source in Athena.
If you need to delete the table entirely rather than just the data within it, you should use the AWS CLI with the s3tables commands:
aws s3tables delete-table \
--table-bucket-arn arn:aws:s3tables:region:account-id:bucket/your-table-bucket-name \
--namespace your_namespace \
--name your_table_name
Replace the placeholders with your specific information. If you need to delete the entire table bucket, you'll first need to delete all tables and namespaces within it, and then use the delete-table-bucket command.
Sources
S3tables deletion | AWS re:Post
How to Fix "The bucket that you tried to delete is not empty" Error When Deleting an S3 Table Bucket | AWS re:Post
S3 Tables - Unable to query using Athena | AWS re:Post
answered a year ago
Relevant content
asked a year ago
asked 10 months ago
asked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 months ago

I played around with it a bit more
select count(*) from simple;now returns the same error .. why even let me write data that it can't handle in the first place?