question

DeanHolmes-2961 avatar image
0 Votes"
DeanHolmes-2961 asked HimanshuSinha-MSFT commented

ADF Error copying pipeline when no rows

Hi

I have a SQL View that returns the days changes to be applied to a table in Dynamics. This is working fine when there are rows of data to copy, but I am getting this error when the SQL View returns zero rows.

This seems like a bug to me. I don't seem to be able to find any settings to stop this happening

Failure happened on 'Sink' side. ErrorCode=DynamicsMissingKeyColumns,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=,Source=,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Input DataSet must contain keycolumn(s) in Upsert/Update scenario. Missing key column(s): accountnumber,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Input DataSet must contain keycolumn(s) in Upsert/Update scenario. Missing key column(s): accountnumber,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Input DataSet must contain keycolumn(s) in Upsert/Update scenario. Missing key column(s): accountnumber,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'


The Pipeline is going from Snowflake DB -> Azure Blob Storage for staging -> Dynamics 365

@KranthiPakala-MSFT Are you able to help?

azure-data-factory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @DeanHolmes-2961 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

0 Votes 0 ·

1 Answer

HimanshuSinha-MSFT avatar image
1 Vote"
HimanshuSinha-MSFT answered HimanshuSinha-MSFT commented

Hello @DeanHolmes-2961 ,
Thanks for the ask and using the Microsoft Q&A platform .
I think you can add a lookup activity before the copy activity . The lookup should call the view and it should execute the copy activity only when the value returned is more tthe 0 .

Lookup -> IF ( lookup value is > 0 ) -> Copy activity .


Please do let me know how it goes .
Thanks
Himanshu
Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks, I have managed to put a lookup in front of the copy activity.

I had to cut&paste the code for the copy activity into the 'true' activity. Is there a way to link a True activity to an existing activity in the pipeline?

0 Votes 0 ·

Is there a way to link a True activity to an existing activity in the pipeline

I think I undersand the ask , but I we do not have a drag and drop like feature at this time .

0 Votes 0 ·