

# MappingSpec
<a name="glue-etl-scala-apis-glue-mappingspec"></a>

**パッケージ: com.amazonaws.services.glue**

## MappingSpec ケースクラス
<a name="glue-etl-scala-apis-glue-mappingspec-case-class"></a>

```
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 オブジェクト
<a name="glue-etl-scala-apis-glue-mappingspec-object"></a>

```
object MappingSpec
```

`MappingSpec` オブジェクトには以下のメンバーがあります。

## Val orderingByTarget
<a name="glue-etl-scala-apis-glue-mappingspec-object-val-orderingbytarget"></a>

```
val orderingByTarget: Ordering[MappingSpec]
```



## Def apply
<a name="glue-etl-scala-apis-glue-mappingspec-object-defs-apply-1"></a>

```
def apply( sourcePath : String,
           sourceType : DataType,
           targetPath : String,
           targetType : DataType
         ) : MappingSpec
```

`MappingSpec` を作成します。
+ `sourcePath` - ソースパスの文字列表現。
+ `sourceType` - ソース `DataType`。
+ `targetPath` - ターゲットパスの文字列表現。
+ `targetType` - ターゲット `DataType`。

戻り値は `MappingSpec`。

## Def apply
<a name="glue-etl-scala-apis-glue-mappingspec-object-defs-apply-2"></a>

```
def apply( sourcePath : String,
           sourceTypeString : String,
           targetPath : String,
           targetTypeString : String
         ) : MappingSpec
```

`MappingSpec` を作成します。
+ `sourcePath` - ソースパスの文字列表現。
+ `sourceType` - ソースデータ型の文字列表現。
+ `targetPath` - ターゲットパスの文字列表現。
+ `targetType` - ターゲットデータ型の文字列表現。

MappingSpec を返します。

## Def apply
<a name="glue-etl-scala-apis-glue-mappingspec-object-defs-apply-3"></a>

```
def apply( product : Product4[String, String, String, String] ) : MappingSpec 
```

`MappingSpec` を作成します。
+ `product` - ソースパス、ソースデータ型、ターゲットパス、およびターゲットデータ型の `Product4`。

戻り値は `MappingSpec`。