- 최신
- 최다 투표
- 가장 많은 댓글
https://stackoverflow.com/questions/54468084/aws-glue-not-copying-idint-column-to-redshift-its-blank
When AWS Glue crawls a column, it might not decide on a definitive type for that column. Instead, it maintains a 'type choice' where the exact type of a crawled column can remain as a number of possibilities throughout the ETL Job. The crawler only crawls a subset of a column's data to determine the probable type. This is why when you run the job or look at a preview, the type of the column might get resolved to a type that is incompatible with the dataset, which results in empty data for the column in question.
The solution is to add into your script an explicit resolution of the choices, by casting the column that's failing to the desired target type. Here is how you can do it:
df.resolveChoice(specs = [('id', 'cast:int')])
관련 콘텐츠
- 질문됨 7년 전
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 3년 전
I used Visual GUI create job, the script code no variable df