Search code examples
databaseazuressisazure-data-factorydynamics-crm

Azure Data Factory - Dynamics 365 Copy Data Copying GUID values not Display Values


I'm new to Azure Data Factory and I am copying various entity info from Dynamics 365 to an SQL DB. However, I am only able to copy the GUID values instead of the display value. What can I do to convert the GUIDs into their Display values?

I've tried looking to see if I can change the XML Query, tried doing a Data Flow from Source to Derived Column using toString. Ran into various issues trying the Data Flow.


Solution

  • I took @Nick.McDermaid's advice and looked more into joining reference tables. I tried this previously with XML but the issue I was running into with that is I did not include an Alias for the linked-entities originally. Therefore, ADF was not picking up those linked entities. Here's an example of my XML:

    <fetch>
      <entity name="cmc_application">
        <attribute name="cmc_applicationid" />
        <attribute name="cmc_contactid" />
        <attribute name="cmc_applicationname" />
        <attribute name="cmc_applicationperiodid" />
        <attribute name="cmc_applicationsubmitted" />
        <attribute name="cmc_programid" />
        <attribute name="cmc_shiftid" />
        <attribute name="cmcps_applicationenrollmentstatus" />
        <attribute name="cmcps_applicationstudenttype" />
        <attribute name="cmcps_campus" />
        <attribute name="cmcps_haveyoueverbeenconvictedofacrime" />
        <attribute name="cmcps_usextensioncampus" />
        <filter>
          <condition attribute="cmc_applicationid" operator="eq" value="@{item().cmc_applicationid}" />
        </filter>
        <link-entity name="cmc_applicationperiod" from="cmc_applicationperiodid" to="cmc_applicationperiodid" link-type="inner" alias="ap">
          <attribute name="cmc_applicationperiodname" />
        </link-entity>
        <link-entity name="mshied_program" from="mshied_programid" to="cmc_programid" link-type="inner" alias="Pro">
          <attribute name="mshied_name" />
        </link-entity>
        <link-entity name="account" from="accountid" to="cmcps_campus" link-type="outer" alias="camp">
          <attribute name="name" />
        </link-entity>
        <link-entity name="account" from="accountid" to="cmcps_usextensioncampus" link-type="outer" alias="ext">
          <attribute name="name" />
        </link-entity>
        <link-entity name="cmc_studenttype" from="cmc_studenttypeid" to="cmcps_applicationstudenttype" alias="student">
          <attribute name="cmc_studenttypename" />
        </link-entity>
            <link-entity name="cmc_shift" from="cmc_shiftid" to="cmc_shiftid" link-type="inner" alias="shift">
          <attribute name="cmc_shiftname" />
        </link-entity>
      </entity>
    </fetch>