Unbox 类 - Amazon Glue
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Unbox 类

取消装箱(重新格式化)DynamicFrame 中的字符串字段。

示例

我们建议您使用 DynamicFrame.unbox() 方法取消装箱 DynamicFrame 中的字段。要查看代码示例,请参阅 示例:使用 unbox 将字符串字段拆开为结构

方法

__call__(frame, path, format, transformation_ctx = "", info="", stageThreshold=0, totalThreshold=0, **options)

拆开 DynamicFrame 中的字符串字段。

  • frame – 要在其中拆开字段的 DynamicFrame(必需)。

  • path – 要拆开的 StringNode 的完整路径 (必需)。

  • format – 格式规范(可选)。这用于 Amazon S3 或支持多种格式的 Amazon Glue 连接。相关受支持的格式,请参阅 Amazon Glue for Spark 中的输入和输出的数据格式选项

  • transformation_ctx – 用于标识状态信息的唯一字符串 (可选)。

  • info – 与转换中的错误关联的字符串 (可选)。

  • stageThreshold – 在转换出错之前可能在其中发生的最大错误数(可选)。默认值为 0。

  • totalThreshold – 在处理出错之前可能全面发生的最大错误数(可选)。默认值为 0。

  • separator – 分隔符令牌 (可选)。

  • escaper – 转义令牌 (可选)。

  • skipFirst – 如果应该跳过第一行数据,则为 True,如果不应跳过,则为 False (可选)。

  • withSchema – 一个字符串,其中包含要拆开的数据的架构(可选)。应始终使用 StructType.json 创建它。

  • withHeader – 如果要解包的数据包含标头,则为 True,否则为 False (可选)。

apply(cls, *args, **kwargs)

继承自 GlueTransform apply

name(cls)

继承自 GlueTransform name

describeArgs(cls)

继承自 GlueTransform describeArgs

describeReturn(cls)

继承自 GlueTransform describeReturn

describeTransform(cls)

继承自 GlueTransform describeTransform

describeErrors(cls)

继承自 GlueTransform describeErrors

describe(cls)

继承自 GlueTransform describe