title: Using ADF Copy Activity with dynamic schema mapping
body: <p>I'm trying to drive the columnMapping property from a database configuration table. My first activity in the pipeline pulls in the rows from the config table. My copy activity source is a Json file in Azure blob storage and my sink is an Azure SQL database.</p>
  
  <p>In copy activity I'm setting the mapping using the dynamic content window. The code looks like this:</p>
  
  <pre><code>"translator": {
      "value": "@json(activity('Lookup1').output.value[0].ColumnMapping)",
       "type": "Expression"
   }
  </code></pre>
  
  <p>My question is, what should the value of activity('Lookup1').output.value[0].ColumnMapping look like?</p>
  
  <p>I've tried several different json formats but the copy activity always seems to ignore it.</p>
  
  <p>For example, I've tried:</p>
  
  <pre><code>{
      "type": "TabularTranslator",
      "columnMappings": {
        "view.url": "url"
      }
  }
  </code></pre>
  
  <p>and: </p>
  
  <pre><code>"columnMappings": {
      "view.url": "url"
  }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>{
    "view.url": "url"
  }
  </code></pre>
  
  <p>In this example, view.url is the name of the column in the JSON source, and url is the name of the column in my destination table in Azure SQL database.</p>