Drupal 7 Migrate: How do I migrate a mult-field key into a single taxonomy term Background: 
I am doing a migration on Drupal 7 using Migrate 7.x-2.5.  And I am migration a Sql table into a Drupal taxonomy.  The key to my source SQL table is comprised of three fields:  element_id, scale_id, and category.

The taxonomy term name must be element_id-scale_id-category so that I can properly reference the taxonomy.  Here is some sample data:

3.A.1   RW   1   None
3.A.1   RW   2   Up to and including 1 month
3.A.1   RW   3   Over 1 month, up to and including 3 months  

So the taxonomy name for the first line above will be "3.1.1-RW-1" and the description will be none.

Here is my code so far: 


$query = Database::getConnection('default', 'external_db')  
         -&gt;select('ete_categories', 'ete')  
         -&gt;fields('ete', array('element_id', 'scale_id', 'category', 'category_description'))  
         -&gt;orderBy('element_id', 'ASC');  

// Create the source data feed using the variable $query

$this-&gt;source = new MigrateSourceSQL($query);   

//       D E F I N E       T H E       D E S T I N A T I O N

$this-&gt;destination = new MigrateDestinationTerm('ete_categories');    

//       D E F I N E       T H E       K E Y S     

$this-&gt;map = new MigrateSQLMap(
  //  We have to tell migrate what the source key is
  $this-&gt;machineName,
  array(
    'element_id' =&gt; array(
      'type' =&gt; 'varchar',
      'length' =&gt; 20,
      'not null' =&gt; TRUE,
      'description' =&gt; 'Element Id',
    ),
    'scale_id' =&gt; array(
      'type' =&gt; 'varchar',
      'length' =&gt; 3,
      'not null' =&gt; TRUE,
      'description' =&gt; 'Scale Id',
    ),
    'category' =&gt; array(
      'type' =&gt; 'decimal',
      'length' =&gt; 3,
      'not null' =&gt; TRUE,
      'description' =&gt; 'category',
    ),
  ),

  MigrateDestinationTerm::getKeySchema()
);

//       M A P       T H E       F I E L D S

//  So let's map the fields

$this-&gt;addFieldMapping('name', CONCAT(`element_id`,'-',`scale_id`,'-',`category`));
$this-&gt;addFieldMapping('description', 'category_description');




My Question 
I can concatenate the three fields into one using command line SQL.  However, I do not know how to do this within the confine of the migration modules.(I realize that the code "CONCAT(element_id,'-',scale_id,'-',category))" is not valid migration code.)   

So how do I concatenate the three fields together into a single field and set the destination field "name" equal to the concatenated fields?

Thanks
In your migration class, you can override the Migration::prepareRow() method to add a new name field to your rows:

  public function prepareRow($row) {
    $row-&gt;name = "{$row-&gt;element_id}-{$row-&gt;scale_id}-{$row-&gt;category}";
    return parent::prepareRow($row);
  }


And then simply map that field:

    $this-&gt;addFieldMapping('name', 'name');


But for simple concatenation, you can also use SelectQuery::addExpression() to add the CONCAT(...) to your SQL query:

    $name_alias = $query-&gt;addExpression(
      "CONCAT(element_id,'-',scale_id,'-',category)",
      'name'
    );


And then simply map the expression to the name field:

    $this-&gt;addFieldMapping('name', $name_alias);