跳至內容

ValueError - Please resolve the pending DynamicFrame choices before using this transformation - AWS Visual Glue Job

0

I am creating an ETL pipeline over AWS Visual Glue Jobs going from a Glue Catalog => Change Schema => Flatten => S3 Bucket. However, I am getting the same error consistently during this process:

ValueError - Please resolve the pending DynamicFrame choices before using this transformation

The transformation being referred to is the gs_flatten() step in my script, but I am not sure how to resolve the DynamicFrame choices without ResolveChoices which would turn my job into a script and no longer a visual job. Any help to resolve this issue would be greatly appreciated.

已提問 2 年前檢視次數 394 次
1 個回答
2
已接受的答案

The error you’re encountering in your AWS Glue job is due to ambiguous types within a DynamicFrame. Before certain transformations can be used, these ambiguities, represented as choice types, need to be resolved. This can be done using the ResolveChoice class in AWS Glue, specifically the DynamicFrame.resolveChoice() method. You can specify resolution strategies such as cast, make_cols, make_struct, and project to handle fields that contain multiple types. For example, df = df.resolveChoice(specs = [("ColumnB[].ColumnD", "cast:double")])

專家
已回答 2 年前
專家
已審閱 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。