There are duplicate column names 'Id' in the structure. An item with the same key has already been added. Activity ID: 1ff3c2a6-fae1-4aa0-b728-8fde216082ac

Nik Kasala 1 Reputation point
2021-04-09T15:26:58.68+00:00

We are looking to query data in SF using ADF and here is the error I am receiving:

There is a duplicate column names 'Id' in the structure. An item with the same key has already been added. Activity ID: 1ff3c2a6-fae1-4aa0-b728-8fde216082ac


Query :
SELECT IBIS_ID__c, RecordType.Name, Type, Name, Short_Name__c, Legal_Name__c, Country__c, State_Abbr__c,

   (SELECT Association_IB_Account__c, Association_IB_Account__r.Name, Association_IB_Account__r.IBIS_ID__c,
            Association_IB_Account__r.RecordType.Name from  Association_Member__r), 
   (SELECT Id, Name, MALatitude__c, MALongitude__c, Status__c from Addresses__r ), 
   (SELECT Id, Account_IBIS_Code__c, 
                Auth_Certificate_Dispatched__c,
    FROM ib_programmes__r) 

FROM Account


I am using relational queries and Salesforce does not provide field aliasing. How can I resolve my error in ADF?

Thanks!
Nik

Azure Database Migration service
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,681 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MartinJaffer-MSFT 26,086 Reputation points
    2021-04-09T18:39:08.36+00:00

    Hello @Nik Kasala and welcome to Microsoft Q&A.

    Data Factory supports two query languages with SalesForce (SOQL , SQL-92). While SOQL does not support aliasing/column renaming, SQL does.

    https://video2.skills-academy.com/en-us/azure/data-factory/connector-salesforce#difference-between-soql-and-sql-query-syntax

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.