title: Azure Data Factory pass parameters into copy task
body: <p>I have a pipeline with a ForEach loop that gets a list of cities to loop through and make a web service (HTTP source) call and writes to a database (sink).  </p>
  
  <p>It works great, however, the API does not return the city as part of the response so I wanted to pass the ForEach parameter (@{item().LocationName}) into the Copy task as part of the column mapping ie:</p>
  
  <pre><code>"columnMappings": {
                                      "@{item().LocationName}": "location",
                                      "blah": "blah",
                                      "blah": "blah", 
  </code></pre>
  
  <p>The 'problem' is that instead of mapping the value of @{item().LocationName} to be the written results, it uses the value of @{item().LocationName} as a column mapping name. ie. tries to find a column name "Vancouver" instead of passing the value "Vancouver" in to the location.</p>
  
  <p>I would say the current behavior is not 'wrong', but looking for a way to pass a variable/parameter in as part of the copy task.</p>
  
  <p>I've tried setting this at the source dataset level with no luck, and it just seems like the wrong location to be setting a variable anyways.</p>
  
  <p>EDIT: I've also tried setting the @{item().LocationName} value in the Dataset in the connection in the JSONPath Expression section, it runs, but does not appear to set a value for location.</p>
  
  <pre><code> "typeProperties": {
          "format": {
              "type": "JsonFormat",
              "filePattern": "setOfObjects",
              "jsonPathDefinition": {
                   "location": "@{item().LocationName}"
  </code></pre>