How to pass a parameter with more than one key field?

Poel van der, RE (Ron) 421 Reputation points
2020-10-21T14:02:19.403+00:00

All
I have a working pipeline, whereby the parameter LogicalKey, type string in pipeline as well as data flow, is filled with one value. This is the logical key of my Sink. Everything works fine. See ‘Old settings’

33900-old.jpg

Now I changed the parameter. It contains two columns.
My hash in a Derived Column activity still works.
But when I use the settings in Sink, as seen in the attached picture, it says:

DF-EXP-061 - Column functions are not allowed in constant expressions –

34067-new.jpg

My questions:

  1. How can I fix the setting in the Sink so that it works with two columns? This is the most important issue.
  2. How can I split the values inside the parameter $LogicalKey into two separate values?
    Meaning if an incoming column of my source equals the first attribute in my parameter, rename that column and give it the values of the source. So if ‘id’ equals, rename ‘id’ to ‘str_id’ and give it the values of ‘id’.
  3. Is there a limit to the number of attributes you can put in a parameter?

Regards
Ron

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,560 questions
0 comments No comments
{count} votes

Accepted answer
  1. HarithaMaddi-MSFT 10,126 Reputation points
    2020-10-22T17:46:26.383+00:00

    Hi @Poel van der, RE (Ron) ,

    I am attaching the pipeline and dataflow JSONs. Please copy into the code section to view the pipeline logic. Below is snap of pipeline parameter and dataflow parameter format

    Pipeline Parameter:

    34385-image.png

    Dataflow Parameter

    34416-image.png

    34403-pipelinejson.txt
    34384-mappingdataflowjson.txt

    Hope this helps!


1 additional answer

Sort by: Most helpful
  1. MarkKromer-MSFT 5,186 Reputation points Microsoft Employee
    2020-10-21T21:33:17.987+00:00

    Don't use byName() here, just split your string to make it into an array, or simply pass in an array of strings here. However, your target database table must have the exact name matches for each of the columns that you are assigning as keys here.

    1 person found this answer helpful.