1 Answer
- Newest
- Most votes
- Most comments
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")])
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago

I am using the gs_flatten() transform in visual jobs, is there a way I can use resolveChoice in visual jobs? Like maybe through Custom Transform?
Answer: Yes, that is precisely what I did and I followed it up with a Select From Collection - Transform node, from this SO answer:
https://stackoverflow.com/questions/54468084/aws-glue-not-copying-idint-column-to-redshift-its-blank
Try to use something like df = df.resolveChoice(specs = [("ColumnB[].ColumnD", "cast:double")])