cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

TABLE_REDIRECTION_ERROR in AWS Athena After Databricks Upgrade to 14.3 LTS

Tam
New Contributor III

I have a Databricks pipeline set up to create Delta tables on AWS S3, using Glue Catalog as the Metastore. I was able to query the Delta table via Athena successfully. However, after upgrading Databricks Cluster from 13.3 LTS to 14.3 LTS, I began encountering TABLE_REDIRECTION_ERROR on AWS Athena.

TABLE_REDIRECTION_ERROR: Table 'awsdatacatalog.<database>.<table>' redirected to 'awsdatacatalog$delta-lake-aws.<database>.<table>', 
but the target table 'awsdatacatalog$delta-lake-aws.<database>.<table>' does not exist.!

Tam_1-1707445843989.png

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @Tam

  1. AWS Glue as a Catalog for Databricks:

  2. TABLE_REDIRECTION_ERROR:

    • The error message indicates that a table redirection occurred, but the target table does not exist.
    • This could be due to changes in table metadata, catalog configuration, or compatibility issues during the Databricks Cluster upgrade.
  3. Possible Solutions:

    • Check Table Metadata:
      • Verify that the table metadata in the Glue Catalog is accurate and consistent.
      • Ensure that the table names and paths match between Databricks and Glue Catalog.
    • Cluster Configuration:
    • Direct Access to S3:
      • If querying directly from Athena, consider accessing the table in S3 without relying on Glue Catalog.
      • Keep in mind that this approach may bypass some metadata advantages.
    • Delta Lake Compatibility:
      • Ensure that your Delta Lake tables are compatible with the upgraded Databricks Cluster.
      • Check for any changes in Delta Lake behavior or features between the LTS versions.
  4. Example Queries:

Remember to validate your setup and ensure consistency across your components. 

 

krystian
New Contributor II

Same problem with Athena and TABLE_REDIRECTION_ERROR

Works on runtime 13.3 but not on 14.3 LTS.

 

CREATE TABLE IF NOT EXISTS tablename (
      myid BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1),
      name string,
      age int   
      )
      USING delta
      LOCATION 's3://location'
      TBLPROPERTIES('delta.feature.allowColumnDefaults' = 'supported',delta.targetFileSize='128mb',delta.autoOptimize.autoCompact=true,delta.autoOptimize.optimizeWrite = true,spark.databricks.delta.schema.autoMerge.enabled = true)

 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.