gpt4 book ai didi

azure - 表格编辑器 - 从表格编辑器 CLI 设置 "Shared Expression"值(使用 Azure Devops)

转载 作者:行者123 更新时间:2023-12-02 23:35:54 25 4
gpt4 key购买 nike

我需要更改 TOM 中的参数值。我正在使用 Azure Devops 以及包含表格编辑器 CLI 的步骤。我编写了一个单行脚本,应该能够更改共享表达式的值。 (也许共享表达式是只读的?)

将要执行的脚本

Model.Expressions["CustomerNameParameter"].Expression = "\"some value\" meta [IsParameterQuery=true, Type=\"Text\", IsParameterQueryRequired=true]";

每当 Azure Devops 尝试运行它时,我都会返回错误: enter image description here

在模型中找不到 CustomerNameParameter。

我的构建如下所示:

Starting: Build Mode.bim from SourceDirectory
==============================================================================
Task : Command line
Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version : 2.201.1
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents: shell
TabularEditor.exe "D:\a\1\s" -B "D:\a\1\a\Model.bim"
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\ba31b528-d9a3-42cc-9099-d80d46d1ffe6.cmd""

Tabular Editor 2.12.4 (build 2.12.7563.29301)
--------------------------------
Dependency tree built in 113 ms
Loading model...
Building Model.bim file...
Finishing: Build Mode.bim from SourceDirectory

最佳答案

你的剧本看起来不错。您是否尝试过在表格编辑器 UI 中执行它?

enter image description here

也许该参数在您的模型中的命名不同。您可以在 CLI 中使用以下脚本输出参数列表:

foreach(var expr in Model.Expressions) Info(expr.Name);

在 CLI 中对上面的屏幕截图所示的模型执行时的结果:

enter image description here

关于azure - 表格编辑器 - 从表格编辑器 CLI 设置 "Shared Expression"值(使用 Azure Devops),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72023918/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com