@TerrenceV In order to make dynamic content work you need to cast the dynamic mapping content to JSON in the dynamic section. I have replicated your ADF pipeline and instead of adding the code directly to the dynamic editor I have created a variable and stored the translator code including collectionreference in the variable (@mapping). Later I have used the variable in dynamic mapping by casting to json using @json () function. Please refer to the below animation for the same.
I have tested the ADF flow by moving the data from cosmos db to SQL table with dynamic mapping and it works as expected and I see two records in SQL table.
Please try it out and let me know if you have any issues.
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.