Error fetching sample data Query execution id e44f373e-5670-4b23-8ea1-6c46ab0ce047 failed to run with Error Message: COLUMN_NOT_FOUND: line 1:8: Relation contains no accessible columns

0

put a csv file into SageMaker data lake and when I go to preview it I receive this error

asked 14 days ago26 views
1 Answer
0

The error you're encountering suggests that there might be an issue with permissions or the way the data is being accessed in your SageMaker data lake. This "COLUMN_NOT_FOUND" error typically occurs when the system cannot access or identify any columns in the relation (table or dataset) you're trying to query.

Here are a few potential reasons and solutions for this issue:

  1. Permissions: Ensure that you have the correct permissions to access the data. If you're using AWS Lake Formation, check if you have been granted SELECT access at the table level and DESCRIBE permission at the database level.

  2. Data Catalog: Verify that the AWS Glue Data Catalog has properly crawled and cataloged your CSV file. Sometimes, if the crawler doesn't correctly identify the columns, it can lead to this error.

  3. File Format: Double-check that your CSV file is properly formatted and that the first row contains column headers if expected.

  4. S3 Bucket Policy: Make sure the S3 bucket containing your CSV file has the appropriate permissions set to allow access from SageMaker.

  5. Athena Settings: If you're using Amazon Athena to query the data, ensure it's correctly configured to work with your data lake.

To troubleshoot:

  1. Try running a Glue Crawler on your S3 bucket to ensure the schema is correctly identified.
  2. Check the table properties in the Glue Data Catalog to see if columns are properly defined.
  3. Verify your IAM roles and policies to ensure they grant the necessary permissions.
  4. If possible, try accessing the CSV file directly through S3 to confirm it's readable and properly formatted.

If the issue persists after checking these points, you may need to consult AWS support for more specific troubleshooting based on your exact setup and configuration.
Sources
Error: COLUMN_NOT_FOUND: line 1:8: SELECT * not allowed from relation that has no columns | AWS re:Post
Build a robust text-to-SQL solution generating complex queries, self-correcting, and querying diverse data sources | AWS Machine Learning Blog

profile picture
answered 14 days 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.

Guidelines for Answering Questions