Skip to content

Invalid table type error in AWS Clean Rooms

0

When trying to run a SQL query in a table I get the following error.

"The query failed to execute: Invalid Glue table type’ ‘null’ for table: FOO” where FOO is the table name.

asked a year ago279 views

2 Answers
0

This error suggests there's an issue with the AWS Glue table configuration that's being referenced in your AWS Clean Rooms query.

AWS Clean Rooms supports specific file formats for tables, including Parquet, RCFile, TextFile, SequenceFile, RegexSerde, OpenCSV, AVRO, and JSON. The "Invalid Glue table type 'null'" error indicates that the table type is either not set or not recognized by AWS Clean Rooms.

To resolve this issue:

  1. Verify that the table in AWS Glue Data Catalog has a properly defined format that's supported by AWS Clean Rooms.

  2. Check that the service role used by AWS Clean Rooms has the necessary permissions to access the table. The permissions for the service role should be set up as required according to the AWS Clean Rooms setup documentation.

  3. If you're using partitioned tables with AWS Clean Rooms Spark SQL, ensure that all partitions in the AWS Glue Data Catalog have corresponding data in S3.

  4. Confirm that the table naming follows AWS Clean Rooms SQL naming rules, which include restrictions on character usage, length requirements, and reserved word handling.

If the issue persists, you might need to recreate the table in AWS Glue with a properly defined format that's compatible with AWS Clean Rooms.
Sources
Troubleshooting AWS Clean Rooms - AWS Clean Rooms
SQL naming rules - AWS Clean Rooms

answered a year ago

0

AWS Clean Rooms supports specific file formats. The AWS Clean Rooms Spark SQL engine checks the "Classification" parameter on the AWS Glue table backing each configured table to ensure that the table is one of the supported formats.

If you use Glue Crawlers to populate the catalog the table the classification parameter will automatically be set. If you catalog the table another way you may need to take an additional step to set the classification parameter.

To set the classification parameter via the console follow these steps:

  1. Navigate to the Glue Data Catalog console page for the table
  2. From the Actions dropdown menu select Edit table
  3. Under Table properties click *Add to add a black property then under Key enter "classification" and under Value enter the file format in lower case, ie "csv".
  4. Click Save

The parameter can also be added via the Glue API

The query should now run.

AWS

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.