Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 months ago
Solved

Copy Jobs Failing Because Multiple are Running

I am creating a metadata driven pipeline with a control table that cycles through a pipeline, one data object at a time. Because of the ease of use I have each data object updated through an individu...
  • Zanqueta's avatar
    Zanqueta
    8 months ago
    When you parameterise a Copy Data activity, you can also make the schema mapping dynamic by using metadata and expressions instead of hardcoding mappings in each pipeline.
     

    Store Mappings in a Metadata Table

    Create a control table (or JSON file) that contains:
    • Source table name
    • Target table name
    • Column mappings in JSON format, for example:
    [
      { "source": "CustomerID", "sink": "Cust_ID" },
      { "source": "CustomerName", "sink": "Cust_Name" }
    ]

     

    Pass Mapping to Copy Activity

    In the Copy Data activity, set the translator property dynamically:
     
     
    "translator": {
        "type": "TabularTranslator",
        "mappings": "@activity('GetMapping').output.value"
    }

     

    Here, GetMapping is the Lookup activity that retrieved the JSON mapping.