Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.