Use of expression or functions in schema mapping in Copy Data Activity. RRS feed

  • Question

  • HI,

    Is it possible to use expression or functions in the schemaMappings section of the copydata activity ?

    Let me put what I am trying to achieve. See the schemaMapping -> name property.

    { "name": "CopyFromMongoDBToOracle", "type": "Copy", "typeProperties": { "source": { "type": "MongoDbV2Source" }, "sink": { "type": "OracleSink" }, "translator": { "type": "TabularTranslator", "schemaMapping": { "name": "@concat($.firstName,' ' ,$.lastName)", "orderDate": "$.date", "order_pd": "prod", "order_price": "price", "city": " $.city[0].name" }, "collectionReference": "$.orders" } } }

    Is this achievable for copy data activity for hierarchical data.

    Friday, May 17, 2019 3:14 PM

All replies

  • Hello Govind , 

    I did tried this , but did not worked out . I am trying to reach to some internal team and see if they can help here . I will update you once I hear from them .

    Thanks Himanshu

    Tuesday, May 21, 2019 8:51 PM
  • Hi Govinda,

    This is not the correct/supported expression usage for schemaMapping. Only setting an expression for the ‘translator’ is supported, instead of the single mapping item inside the ‘translator’.

    Also, the value being passed to this expression should be in the correct format. See the below example: 

    And the value we pass to this expression is an object value like:


                            "type": "TabularTranslator",

                            "schemaMapping": {

                                "aa": "_id['$oid']",

                                "bb": "abc.Name",

                                "cc": "abc.GroupName",

                                "dd": ""



    Click the below MSDN link to see how the previous customer achieved this:

    Wednesday, May 22, 2019 2:28 AM