Reply
Barnita
New Member

Alternate key in Copy Activity for Dataverse expects bool

Hi All,

 

I am trying to create a pipeline where my source is file and i'm trying to upsert the data into dataverse. for that I want to pass the alternate key in dynamic format. But while passing the alternate key( which is actually a string and parameter of the pipeline) I am getting below error:

Expression of type: 'String' does not match the field: 'alternateKeyName'. Expected type is 'bool'.

Barnita_1-1724330334575.png

Could any one help? How can alternate key be of type boolean? 

4 REPLIES 4
Zelazny
New Member

I was having the same problem.  The answer suggested is no help at all.  The Alternate Key Name is a field where you provide the name of the key column - the column used as a key to perform a merge or upsert.  It has to be the name of one of the columns in the table.  I know that we can remove the error by putting a parameter with a value of True or False into it, but that will not tell the merge activity which column to use, resulting in an error when we run the pipeline.  

 

I did note that when the error appeared, it was in yellow rather than red, so I saved the pipeline anyway (with the correct string in place of the required bool) and ran it and everything worked.  So this appears to be a display bug only.  

v-zhangtin-msft
Community Support
Community Support

Hi, @Barnita 

 

I briefly restored your question.

vzhangtinmsft_5-1724381467756.png

After testing, you can try the following methods. Create a new parameter.

vzhangtinmsft_2-1724381023872.png

vzhangtinmsft_4-1724381111738.png

No errors are reported at this time.

 

For more information you can refer to the following documents.

Expression and functions - Azure Data Factory & Azure Synapse | Microsoft Learn

Configure Dataverse in a copy activity - Microsoft Fabric | Microsoft Learn

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Charlotte,

 

Thank you for your reply.

I understand that if I use a parameter of type boolean, no error will be shown.

But alternate key has to be a string. Boolean can hold only true or false value. To be able to pass a proper key (example- ID, Name) I have to pass a string to this alternate key box.

 

Can you please let me know why it expects a boolean exactly? 

Hi, @Barnita 

 

Pipeline parameters are available as strings. You can refer to this document hope it help: Pipeline parameters and variables - Azure Data Factory & Azure Synapse | Microsoft Learn

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

avatar user

Helpful resources

Announcements
March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)