Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Refresh Semantic Model - Table Dynamic Content

I've set up dynamic content inside of a Refresh Semantic Model activity inside of a data pipeline. So far I've dynamically set the Workspace Id and the Semantic Model but I've previously left the tab...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous,

    When using the dynamic expression builder in the Refresh Semantic Model activity, simply pasting a JSON object like [{"table": "TableName"}] won’t work directly, you’ll need to wrap it using the @json() function, as the expression builder expects a string that it can parse at runtime. 

    If you are entering static table names via expression, paste this directly in the dynamic expression field:

    @json('[{"table": "TableName1"}, {"table": "TableName2"}]'). This wraps your valid JSON in a string and parses it correctly at runtime. 

    If you are passing table names dynamically using a variable like TableList = Table1,Table2 use this expression: @json(concat('[', replace(variables('TableList'), ',', '},{"table": "'), '{"table": "'), ']')). This takes a comma-separated string like Table1,Table2 and converts it into a valid array. 

     

    Now where to paste It? In the "Tables" input field, switch to dynamic content then click “Add dynamic content” and go to the Expression tab. Paste the full expression (@json(...)) into the editor. Now click OK to save.

     

    If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

    Best Regards,
    Hammad.
    Community Support Team

     

    If this post helps then please mark it as a solution, so that other members find it more quickly.

    Thank you.