<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JSON data structure reconstruction in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/JSON-data-structure-reconstruction/m-p/4412121#M4858</link>
    <description>&lt;P&gt;I'd recommend posting this question in the Azure Data Factory community forum:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://techcommunity.microsoft.com/category/azuredatabases/discussions/azuredatafactory" target="_blank"&gt;https://techcommunity.microsoft.com/category/azuredatabases/discussions/azuredatafactory&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Mapping Dataflows are specific to Azure Data Factory. The community where this is posted is specific to Fabric Data Factory where Mapping Dataflows are not available.&lt;/P&gt;</description>
    <pubDate>Sat, 15 Feb 2025 13:22:19 GMT</pubDate>
    <dc:creator>miguel</dc:creator>
    <dc:date>2025-02-15T13:22:19Z</dc:date>
    <item>
      <title>JSON data structure reconstruction</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/JSON-data-structure-reconstruction/m-p/4411859#M4857</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on an Azure Cosmos DB migration where I need to transform the structure of documents in the "Notes" container. While I have identified most of the migration steps, I am currently facing a challenge with structural conversion and parsing of a JSON array field inside Azure Data Factory (ADF) Data Flow.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem Context:&lt;/STRONG&gt;&lt;BR /&gt;I need to convert the "NoteDetails" array field from the original document format to a new normalized structure. The transformation involves flattening the array and restructuring it into a key-value format within a new field called "NormalizedNoteDetails".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Document (Current Cosmos DB Structure):&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "id": "123",
    "ownerId" : "1234",
    "noteCategory" : "somecategory",
    "NoteDetails": [
    {
      "Key": "PropertyNameKey1",
      "Value": ["prop1of1", "prop2of1"]
    },
    {
      "Key": "PropertyNameKey2",
      "Value": ["prop1of2", "prop2of2"]
    }]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Expected Transformed Structure (Target Format in Cosmos DB):&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "id": "123",
    "ownerId" : "1234",
    "noteCategory" : "somecategory",
    "normalizedNoteDetails": {
      "PropertyNameKey1": ["prop1of1", "prop2of1"],
      "PropertyNameKey2": ["prop1of2", "prop2of2"]
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Specific Question:&lt;/STRONG&gt;&lt;BR /&gt;How can I efficiently parse and transform the "Notes" JSON array field inside an ADF Data Flow activity to achieve the new structure? I have tried flatten and pivot with no success but I am newbie to the ADF. A concrete example would help me tremendously.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 03:06:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/JSON-data-structure-reconstruction/m-p/4411859#M4857</guid>
      <dc:creator>cyberman</dc:creator>
      <dc:date>2025-02-15T03:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data structure reconstruction</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/JSON-data-structure-reconstruction/m-p/4412121#M4858</link>
      <description>&lt;P&gt;I'd recommend posting this question in the Azure Data Factory community forum:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://techcommunity.microsoft.com/category/azuredatabases/discussions/azuredatafactory" target="_blank"&gt;https://techcommunity.microsoft.com/category/azuredatabases/discussions/azuredatafactory&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Mapping Dataflows are specific to Azure Data Factory. The community where this is posted is specific to Fabric Data Factory where Mapping Dataflows are not available.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 13:22:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/JSON-data-structure-reconstruction/m-p/4412121#M4858</guid>
      <dc:creator>miguel</dc:creator>
      <dc:date>2025-02-15T13:22:19Z</dc:date>
    </item>
  </channel>
</rss>

