

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

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

**Package : com.amazonaws.services.glue**

## MappingSpec classe de cas
<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` du champ source.
+ `sourceType` — `DataType` du champ source.
+ `targetPath` — `SchemaPath` du champ cible.
+ `targetType` — `DataType` du champ cible.

Un `MappingSpec` spécifie un mappage entre un chemin d'accès source et un type de données source, et un chemin cible et un type de données cible. La valeur du chemin d'accès source de l'image source s'affiche dans l'image cible du chemin cible. Le type de données source est converti dans le type de données cible.

Il s'étend depuis `Product4` afin que vous puissiez manipuler n'importe quel `Product4` dans votre interface `applyMapping`.

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

```
object MappingSpec
```

L'objet `MappingSpec` coontient les membres suivants :

## 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
```

Crée un `MappingSpec`.
+ `sourcePath` — Représentation sous forme de chaîne du chemin d'accès source.
+ `sourceType` – source `DataType`.
+ `targetPath` — Représentation sous forme de chaîne du chemin d'accès cible.
+ `targetType` – cible `DataType`.

Retourne un `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
```

Crée un `MappingSpec`.
+ `sourcePath` — Représentation sous forme de chaîne du chemin d'accès source.
+ `sourceType` — Représentation sous forme de chaîne du type de données source.
+ `targetPath` — Représentation sous forme de chaîne du chemin d'accès cible.
+ `targetType` — Représentation sous forme de chaîne du type de données cible.

Renvoie un 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 
```

Crée un `MappingSpec`.
+ `product` — `Product4` du chemin d'accès source, type de données source, chemin d'accès cible et type de données cible.

Retourne un `MappingSpec`.