You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在AWS Glue中使用resolveChoice()转换指定数组结构体?

AWS Glue中使用resolveChoice指定嵌套数组结构Schema的方法

当你需要在AWS Glue作业中通过resolveChoice()指定individual_lender_probs这个嵌套数组结构的Schema时,需要明确写出数组内部结构体的完整字段和类型定义,具体写法如下:

df = df.resolveChoice(specs = [('individual_lender_probs','cast:<strong>array<struct<lender:string,buy_rate:double,approve_prob:double>></strong>')])
  • array<> 用于声明外层的数组类型
  • 数组元素为struct<>类型,内部按顺序定义每个字段的名称与对应数据类型,字段之间用逗号分隔

内容的提问来源于stack exchange,提问作者user12253044

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 13:00:50