<?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: Using HierarchicalTranslator in Fabric copy activity in Fabric platform</title>
    <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4775315#M18924</link>
    <description>&lt;P&gt;Update -&lt;BR /&gt;DataFlows Do not work. Currently, the output destinations are limited. MongoDB as sink is not supported for fabric dataflow activities.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jul 2025 15:05:59 GMT</pubDate>
    <dc:creator>shivangjha</dc:creator>
    <dc:date>2025-07-24T15:05:59Z</dc:date>
    <item>
      <title>Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774085#M18877</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I am using Fabric copy activity to write some data to MongoDB Atlas collection in a Fabric Data pipeline.&lt;/P&gt;&lt;P&gt;I wanted to specify&amp;nbsp;HierarchicalTranslator because i want to create hierarchical data in mongo from a tabular source.&lt;BR /&gt;The source of data is a fabric lakehouse table.&lt;BR /&gt;&lt;BR /&gt;So, if the lakehouse table, table1 has columns- a, b, c, d -&amp;nbsp;&lt;BR /&gt;i want to store these in mongo as&amp;nbsp;&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;'a': 'value of a',&lt;/P&gt;&lt;P&gt;'parameters': {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'b': "val_b'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'c': "val_c'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'d': "val_d'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;What i have tried so far:&lt;BR /&gt;1. Mapping -&amp;nbsp;&lt;BR /&gt;mapping type was Tabular, but sink setting for the mapping was liek below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;b -&amp;gt; 'parameters.b'&lt;/P&gt;&lt;P&gt;...so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it resulted in persistance of&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;'parameters.b': "val_b"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;in mongo collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Tried editing the pipeline json - and put mapping to HierarchicalTranslator - but it gets silently reverted to Tabular and the result is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other way?&lt;/P&gt;&lt;P&gt;Please let me know in case i need to give more info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 17:45:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774085#M18877</guid>
      <dc:creator>shivangjha</dc:creator>
      <dc:date>2025-07-23T17:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774599#M18893</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="769412" data-lia-user-login="shivangjha" class="lia-mention lia-mention-user"&gt;shivangjha&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;You're hitting a common limitation with Fabric copy activities when trying to create nested JSON structures. The dot notation approach you tried creates literal field names instead of hierarchical structures.&lt;/P&gt;&lt;P class=""&gt;Here's what actually works:&lt;/P&gt;&lt;P class=""&gt;Option 1: Use Data Flow instead Copy activity isn't great for complex JSON transformations. Switch to Data Flow:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add your lakehouse table as source&lt;/LI&gt;&lt;LI&gt;Use Derived Column transformation:&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;parameters = @(b=b, c=c, d=d)&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Select only a and parameters columns&lt;/LI&gt;&lt;LI&gt;Send to MongoDB sink&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;Option 2: Pre-build the structure in your lakehouse Create a view or use SQL to structure your data first:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;SELECT&lt;/SPAN&gt; 
    a&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
    STRUCT&lt;SPAN class=""&gt;(&lt;/SPAN&gt;b &lt;SPAN class=""&gt;as&lt;/SPAN&gt; b&lt;SPAN class=""&gt;,&lt;/SPAN&gt; c &lt;SPAN class=""&gt;as&lt;/SPAN&gt; c&lt;SPAN class=""&gt;,&lt;/SPAN&gt; d &lt;SPAN class=""&gt;as&lt;/SPAN&gt; d&lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt; parameters
&lt;SPAN class=""&gt;FROM&lt;/SPAN&gt; table1&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;Option 3: JSON string approach (last resort) If you must stick with copy activity, create the nested object as a JSON string:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;parameters = concat('{"b":"', b, '","c":"', c, '","d":"', d, '"}')&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;The HierarchicalTranslator reverting to Tabular is expected behavior - it's not fully supported for MongoDB sinks in Fabric yet.&lt;/P&gt;&lt;P class=""&gt;Data Flow is your best bet for reliable hierarchical JSON creation. Have you tried that approach yet?&lt;/P&gt;&lt;HR /&gt;&lt;P class=""&gt;If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7" color="#808080"&gt;This response was assisted by AI for translation and formatting purposes.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:37:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774599#M18893</guid>
      <dc:creator>burakkaragoz</dc:creator>
      <dc:date>2025-07-24T06:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774602#M18894</link>
      <description>&lt;P&gt;fabric data pipelines do not currently support HierarchicalTranslator mappings for mongodb sinks as of now only tabular mappings are supported. The reason is w&lt;SPAN&gt;hen you try to set the translator to &lt;/SPAN&gt;HierarchicalTranslator&lt;SPAN&gt;, it silently reverts to &lt;/SPAN&gt;TabularTranslator&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MongoDB ends up storing keys like &lt;/SPAN&gt;'parameters.b'&lt;SPAN&gt; instead of nesting the fields.&amp;nbsp; In the background fabric copy activity currently does not interpret dot notation ('parameters.b') in mappings as hierarchy when writing to MongoDB. It simply writes the key as is but not as a nested object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the current limitations the best workarounds that you can try is to ...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;use a fabric notebook to transform and write to MongoDB using pymongo&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;for prod use cases requiring GUI based ETL with hierarchical outputs, consider ADF or synapse pipelines&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please 'Kudos' and 'Accept as Solution' if this answered your query.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:39:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774602#M18894</guid>
      <dc:creator>Vinodh247</dc:creator>
      <dc:date>2025-07-24T06:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774608#M18896</link>
      <description>&lt;P&gt;Thanks Vinodh for the reply.&lt;/P&gt;&lt;P&gt;Re -&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;"use a fabric notebook to transform and write to MongoDB using pymongo"&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This has another problem as Fabric notebook IPs are non-deterministic so i can't whitelist the mongo clusters specifically for the notebooks unless i resort to whitelisting the mongo cluster for all ip ranges, which won't be appropriate.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:43:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774608#M18896</guid>
      <dc:creator>shivangjha</dc:creator>
      <dc:date>2025-07-24T06:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774625#M18897</link>
      <description>&lt;P&gt;Thanks for the response&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529075" data-lia-user-login="burakkaragoz" class="lia-mention lia-mention-user"&gt;burakkaragoz&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Will try Data Flow for this.&lt;BR /&gt;&lt;BR /&gt;Re Pre-building json -&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;"Option 2: Pre-build the structure in your lakehouse Create a view or use SQL to structure your data first:"&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;I tried this transformation in a notebook and saving that as delta table, which then supposedly could be referred in the data copy activity. The data copy activity complains about STRUCT data type.&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Fabric Copy Activity&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;does not support&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;STRUCT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;types&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in Delta&lt;/LI&gt;&lt;/UL&gt;Will try the Data Flow approach.&lt;BR /&gt;Thanks&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:53:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4774625#M18897</guid>
      <dc:creator>shivangjha</dc:creator>
      <dc:date>2025-07-24T06:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4775315#M18924</link>
      <description>&lt;P&gt;Update -&lt;BR /&gt;DataFlows Do not work. Currently, the output destinations are limited. MongoDB as sink is not supported for fabric dataflow activities.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 15:05:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4775315#M18924</guid>
      <dc:creator>shivangjha</dc:creator>
      <dc:date>2025-07-24T15:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using HierarchicalTranslator in Fabric copy activity</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4775318#M18925</link>
      <description>&lt;P&gt;Fixed the issue partially by writing the documents as Json Files in the lakehouse and then using copy activity.&lt;BR /&gt;The hierarchy of the documents is maintained in mongoDB.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 15:07:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/Using-HierarchicalTranslator-in-Fabric-copy-activity/m-p/4775318#M18925</guid>
      <dc:creator>shivangjha</dc:creator>
      <dc:date>2025-07-24T15:07:45Z</dc:date>
    </item>
  </channel>
</rss>

