Azure data factory returns columns not specified in fetchXML query

98 views Asked by At

Using Azure Data factory to move data out of Dynamics CRM i am using the Dataverse connector in a copy activity

I specify my fetchXML as such

<fetch>
<entity name="account">
    <attribute name="accountid"/>
    <attribute name="name"/>
    <attribute name="createdby"/>
    <attribute name="modifiedby"/>
    <attribute name="createdon"/>
    <attribute name="modifiedon"/>
    <attribute name="ownerid"/>
    <attribute name="transactioncurrencyid"/>
    <attribute name="owningbusinessunit"/>
    <attribute name="emailaddress1"/>
    <attribute name="address1_line1"/>
    <attribute name="address1_postalcode"/>
    <attribute name="address1_city"/>
    <attribute name="address1_country"/>
    <attribute name="msdyn_serviceterritory"/>
    <attribute name="msdyn_workorderinstructions"/>
    <attribute name="exchangerate"/>
    <link-entity name="stringmap" from="attributevalue" to="statecode" link-type="outer" alias="state">
        <attribute name="value" alias="state" />
        <filter type="and">
            <condition attribute="attributename" operator="eq" value="statecode" />
            <condition attribute="langid" operator="eq" value="1033" />
            <condition attribute="objecttypecode" operator="eq" value="1" />
        </filter>
    </link-entity>
    <link-entity name="stringmap" from="attributevalue" to="statuscode" link-type="outer" alias="status">
        <attribute name="value" alias="status" />
        <filter type="and">
            <condition attribute="attributename" operator="eq" value="statuscode" />
            <condition attribute="langid" operator="eq" value="1033" />
            <condition attribute="objecttypecode" operator="eq" value="1" />
        </filter>
    </link-entity>
    <link-entity name="stringmap" from="attributevalue" to="businesstypecode" link-type="outer" alias="businessType">
        <attribute name="value" alias="businessType" />
        <filter type="and">
            <condition attribute="attributename" operator="eq" value="businesstypecode" />
            <condition attribute="langid" operator="eq" value="1033" />
            <condition attribute="objecttypecode" operator="eq" value="1" />
        </filter>
    </link-entity>
    <link-entity name="stringmap" from="attributevalue" to="address1_addresstypecode" link-type="outer" alias="addressType">
        <attribute name="value" alias="addressType" />
        <filter type="and">
            <condition attribute="attributename" operator="eq" value="address1_addresstypecode" />
            <condition attribute="langid" operator="eq" value="1033" />
            <condition attribute="objecttypecode" operator="eq" value="1" />
        </filter>
    </link-entity>
</entity>

This draws data out of the service as expected except I get columns not specified in the fetchXML query

enter image description here

The same query within FetchXML builder in XrmToolBox does not return this extra column

Anyone here know how I can avoid getting this extra column in my result? (It messes up my dynamic mapping in the copy activity)

0

There are 0 answers