Schema was not updated after the glue job run

0

Schema was not updated after the glue job run by following the code in this page: https://docs.aws.amazon.com/glue/latest/dg/update-from-job.html

In the "Updating table schema" sesssion, it says

When the job finishes, view the modified schema on the console right away, without having to rerun the crawler. You can enable this feature by adding a few lines of code to your ETL script, as shown in the following examples. The code uses enableUpdateCatalog set to true, and also updateBehavior set to UPDATE_IN_DATABASE, which indicates to overwrite the schema and add new partitions in the Data Catalog during the job run.

In my case, the schema of the source is changing over time. For example, there might be a new column added to the source table. However, in the data catalog, the schema of the destination table does not get updated, meaning that the new column is not added, after the glue job finishes.

What is going wrong? As a result, it throws "HIVE_CURSOR_ERROR: Failed to read Parquet file" when querying the table in the Athena.

질문됨 9달 전1076회 조회
1개 답변
0

Hi,

Is your table "partitioned" ? If not, then you need to drop the table and re-create. This is a known limitation in AWS glue as per the documentations below :

Schema updates are not supported for non-partitioned tables (not using the "partitionKeys" option). https://docs.aws.amazon.com/glue/latest/dg/update-from-job.html

profile pictureAWS
전문가
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠