1

Im trying to refresh an external table but it is not working.

I need to REFRESH the table manually since I don't have an explicit periodicity to make it automatically. Also read the documentation: https://docs.snowflake.com/en/sql-reference/sql/alter-external-table#add-or-remove-files-manually

I made the following:

  1. I created my external table by:

CREATE OR REPLACE EXTERNAL TABLE DB.PUBLIC.TABLE_1( <columns goes here> ) LOCATION = @S3_stage/table_1/ FILE_FORMAT = ( FORMAT_NAME = 'parquet' );

I tested it was working and it worked. The table was created with it's information.

  1. Then I tried to refresh the table by using:

ALTER EXTERNAL TABLE DB.PUBLIC.TABLE_1 REFRESH @S3_stage/table_1/date_year=2024/date_month=5/;

but it's not working. I've also tried to REMOVE or ADD files with:

ALTER EXTERNAL TABLE DB.PUBLIC.TABLE_1 REMOVE FILES ('date_year=2024/date_month=5/');

but it isn't working either. When I get the query results it shows me an error "UNREGISTER_FAILED" with the description "File unregistration failed: No such file." BUT when I observe the "file" column at the results it shows me the right path table_1/date_year=2024/date_month=5/

Does anyone knows what am I doing wrong?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.