Forum Discussion
Refresh Semantic Model - Table Dynamic Content
- Anonymous1 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 TeamIf this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Can I just ask, how were you able to save a pipeline with dynamic expressions in Workspace and Model fields?
For me, I get validation errors when I try to save/run with dynamic expressions in those fields.
Hi VolueHelge,
Currently the workspace and semantic model fields in the Refresh Semantic Model activity only accept static values during validation. This means if you try to put dynamic expressions directly, you’ll see validation errors.
You can try to first save the activity with static values (Workspace + Model) so validation passes. Then, switch those fields to dynamic content expressions. The pipeline will still run successfully at execution time, even though the UI cannot pre-validate dynamic IDs.
This is a known limitation with the designer’s validation step, not with the runtime execution.
Best Regards,
Hammad.
- zyw20255 months agoNew Member
Could you elaborate on this?
- I put in static values in Workspace and SM field- Saved pipeline, validation passed
- Changed the fields to dynamic expression again
- as soon as I attempt to run it, it promps for "Save and Run" and by clicking that, the validation error appears again.
- PurpleNoori3 months agoNew Member
Hi,
I am having same problem. I want to pass Workspace id and semantic model id dynamically but cannot even save the pipeline
What is the solution to this please..??