本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
MappingSpec
程序包:com.amazonaws.services.glue
MappingSpec case 类
case class MappingSpec( sourcePath: SchemaPath,
sourceType: DataType,
targetPath: SchemaPath,
targetType: DataTyp
) extends Product4[String, String, String, String] {
override def _1: String = sourcePath.toString
override def _2: String = ExtendedTypeName.fromDataType(sourceType)
override def _3: String = targetPath.toString
override def _4: String = ExtendedTypeName.fromDataType(targetType)
}
sourcePath
- 源字段的SchemaPath
。sourceType
- 源字段的DataType
。targetPath
- 目标字段的SchemaPath
。targetType
- 目标字段的DataType
。
MappingSpec
指定从源路径和源数据类型到目标路径和目标数据类型的映射。源路径的源帧中的值会显示在目标路径的目标帧中。源数据类型将强制转换为目标数据类型。
它从 Product4
扩展而来,因此您可在 applyMapping
接口中处理任何 Product4
。
MappingSpec 对象
object MappingSpec
MappingSpec
对象具有以下成员:
Val orderingByTarget
val orderingByTarget: Ordering[MappingSpec]
Def apply
def apply( sourcePath : String,
sourceType : DataType,
targetPath : String,
targetType : DataType
) : MappingSpec
创建 MappingSpec
。
sourcePath
– 源路径的字符串表示形式。sourceType
- 源DataType
。targetPath
– 目标路径的字符串表示形式。targetType
- 目标DataType
。
返回 MappingSpec
。
Def apply
def apply( sourcePath : String,
sourceTypeString : String,
targetPath : String,
targetTypeString : String
) : MappingSpec
创建 MappingSpec
。
sourcePath
– 源路径的字符串表示形式。sourceType
– 源数据类型的字符串表示形式。targetPath
– 目标路径的字符串表示形式。targetType
– 目标数据类型的字符串表示形式。
返回 MappingSpec。
Def apply
def apply( product : Product4[String, String, String, String] ) : MappingSpec
创建 MappingSpec
。
product
– 源路径、源数据类型、目标路径和目标数据类型的Product4
。
返回 MappingSpec
。