本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
PySpark 扩展类型
Amazon Glue PySpark 扩展所使用的类型。
DataType
其他 Amazon Glue 类型的基类。
返回一个包含类的数据类型和属性的 JSON 对象:
{ "dataType": typeName, "properties": properties }
AtomicType 和简单衍生
继承自并扩展 DataType 类,并且充当所有 Amazon Glue 原子数据类型的基类。
以下类型是 AtomicType 类的简单衍生:
DecimalType(AtomicType)
继承自并扩展 AtomicType 类以表示十进制数字 (以十进制数字表示的数字,与二进制以 2 为底数的数字相对)。
EnumType(AtomicType)
继承自并扩展 AtomicType 类以表示有效选项的枚举。
集合类型
ArrayType(DataType)
__init__(elementType=UnknownType(), properties={})
ChoiceType(DataType)
MapType(DataType)
__init__(valueType=UnknownType, properties={})
Field(Object)
根据从 DataType 派生的对象创建一个字段对象。
__init__(name, dataType, properties={})
StructType(DataType)
定义数据结构 (struct
)。
__init__(fields=[], properties={})
EntityType(DataType)
__init__(entity, base_type, properties)
此类尚未实现。
其他类型
DataSource(对象)
getFrame()
为数据源返回 DynamicFrame
。
DataSink(对象)
writeFrame(dynamic_frame, info="")
write(dynamic_frame_or_dfc, info="")
写入 DynamicFrame
或 DynamicFrameCollection
。