构建工作流
重要
Some context (right-click) menu options are not available for Basic users. These are identified as "Full User".
工作流由一连串连接在一起的工具组成,每个工具在处理数据上发挥不同的功能。创建工作流时,你需要添加和连接工具。你还可以配置这些工具和工作流的属性。要创建新的工作流,请选择文件 > 新建工作流。
根据您在工作流配置窗口中选择的工作流布局,工作流连接沿下游方向垂直或水平移动。
添加或删除工具
要将工具添加到工作流,从工具面板中选择一个工具并将其拖动到工作流画布上,或者右键单击工作流,通过菜单插入工具。如需了解详情,请参阅工具类别。
要删除工作流的工具,请选择该工具,然后使用键盘上的 “Delete” 键。
连接工具
要连接工作流中的工具,将工具从工具面板拖到画布中另一个工具的输出锚点附近的位置。你还可以将一个现有工具的输出锚点拖动到刚添加的工具上。
连接由工具的左侧(或上方)传入,然后经由工具的右侧(或下方)传出。某些工具接受多个输入,表现在工具的锚点数量上。某些工具具有可选输入,其输入锚点显示为灰色。所有具有输出锚点的工具都可以输出到多个流。
选择一个工具来显示传入和传出连接标志。工具的连接器输入为绿色,工具的连接器输出为蓝色。
选择连接并使用键盘上的删除键或右键单击并选择删除连接。这不会删除下游工具。
选择连接并在“连接配置”窗口中选中“无线”复选框。或者,您也可以在画布上右键单击连接,然后选择发起无线连接。建立无线连接后,连接箭头将不可见。输入和输出锚点均标有无线符号,以指示无线连接。条形图的颜色表示锚点的传入或传出连接的数量。一条表示一个连接,两条表示两个连接,三条表示三个或更多连接。
Connections with a staple can also be made wireless. Both sides of a connection with a staple are made wireless together. If 1 or more connections are not wireless, the staple is visible. If all connections are wireless, then the staple also disappears.
Preview Feature
Connection Staples are in Preview during the 2025.2 release and require a Full User role.
Connection Staples are a new visual and functional enhancement in Designer that lets you group and organize connections between tools on the canvas. Staples visually group related tool connections, reducing clutter and helping users quickly identify which tools work together as part of a logical process. Staples are lightweight, non-intrusive, and do not affect the logic or execution of the workflow.
Connection Staples Limitations
There are several important limitations to be aware of when you use connection staples:
Staples are not compatible with older versions of Designer. This means that if you add connection staples in Designer 25.2, those staples are not supported when the workflow is opened in a previous version of Designer.
Staples don't work with a single connection. You must select at least 2 connections.
Staples don't connect to Interface tools and In-Database tools.
You can't add new connections to existing staples.
There are no staple configuration options, and you can't add annotations to staples.
Staples do not work with more than 20 tool connections.
To add a Connection Staple...
Select at least 2 or more connections and right-click to open the connection context menu. The connections can be from the same or different tools, and there is no limit on the number of connections that you can staple.
Select Add Connection Staple (Preview). The selected connections are grouped into a "staple" on the canvas.
Once a connection staple is in place, select a tool to see which connection from the input/output of the staple it is associated with. Additionally, when a staple is on the canvas, you can access the staple's context menu by right-clicking on the staple. The context menu has these options:
Zoom: Select to...
Zoom In
Zoom Normal: Return to the default zoom level.
Zoom Out
All: Zoom to fit all tools in the window.
Selected tools: Zoom to fit all selected tools in the window.
Make Connections Wireless: All connections going through the staple are made wireless.
Remove Connection Staple (Preview): Select one or more staples to delete the staple and rewire the connections.
选择连接并使用“连接配置”窗口的线条部分更改其颜色。您也可以选择画布上的连接,然后右键单击以选择更改连接颜色。
请注意,这是一个工作流级别的设置,会覆盖用户设置 > 主题 > 连接设置中连接颜色的设置。自定义连接颜色在 24.2 之前的 Designer 版本中不起作用,但不会影响工作流。
There are several options for inserting tools into an existing connection:
右键单击连接并选择在连接中插入,然后选择一个工具。
从工具面板或画布上的任意位置拖动一个工具,并将鼠标悬停在现有连接上。
右键单击输出锚点并选择插入,然后选择一个工具。
You can use the Paste in Connection option to insert a tool or group of tools into an existing connection. To access this option...
First, select and copy a tool or group of tools on the canvas.
Next, right-click on an existing connection and select Paste Tools in Connection. The copied tools are inserted into the connection. Note that you can also drag the selected tools over a connection to insert them.
The original connection automatically disconnects between the 2 tools and makes 2 new connections: one for input and one for output. The downstream tool shifts automatically based on the length of the grouped tools. Additionally, only open anchors can get new connections.
If you make a mistake while inserting a group of tools into a connection, you can use the Undo (Ctrl+Z) option in the toolbar.
用户可以查看可能的工具连接列表,并同时建立多个连接。这对于将多个数据输入连接到单个下游工具非常有用。
若要建立多个连接:
选择画布上的工具。如果工具同时接受输入和输出,请专门选择工具的输入或输出锚点,以确定与该锚点之间可能存在的连接列表。
右键单击所选锚点并选择查看可能的连接。
在“可能的连接”窗口中,从输出连接列表中选择一个或多个工具,以连接到输入连接列表中的一个或多个工具。
在连接类型下,选择进行有线连接还是无线连接。
选择连接。
查看多个工具存在的可能连接时,仅显示输出到输入锚点间的有效连接。
双击任何连接以在配置窗口查看和修改其属性:
名称:输入连接的名称。
无线:选择以将连接设置成无线。
线条:选择“...”按钮为连接选择自定义颜色。
字段:在表格中查看通过连接的数据。
对于无线连接,具有带彩色条的无线连接图标
表示某个锚点的传入或传出连接的数量:
1 个彩色条代表 1 个连接。
2 个彩色条代表 2 个连接。
3 个彩色条代表 3 个或更多的连接。
除非选择了该工具,否则连接线是不可见的。
工作流选项卡右键单击选项
选择画布上的工作流选项卡,右键单击该选项卡以显示包含以下选项的菜单:
关闭:关闭工作流。
关闭此选项卡以外的所有项:关闭除此工作流之外的所有打开的工作流。
关闭全部:关闭所有打开的工作流。
复制:创建工作流的副本。
Designer 能将路径依赖关系从相对路径改成绝对路径。如需了解详情,请转至工作流依赖关系。
工具右键单击选项
选择画布上的工具,右键单击以显示包含以下选项的菜单:
剪切:剪切所选工具。
复制:复制所选工具。
删除:删除所选工具。
缩放:选择以...
放大
取消缩放:取消缩放。
缩小
全部:缩放使窗口能容纳所有工具。
已选工具:进行缩放,以适应窗口中所有选择的工具。
查看可能的连接:查看与所选工具间可能存在的工具连接。
添加至新容器:将所选工具添加至容器工具。如需了解详情,请转到工具容器工具。
添加至新控制容器:将所选工具添加至控制容器工具。如需了解详情,请转到控制容器工具。
置于顶层:如果工具重叠,则将所选的工具置于顶层。这对于注释框排版或排序重叠的工具注释很有用。如需了解详情,请转到注释工具。
置于底层:如果工具重叠,则将所选的工具置于底层。这对于注释框排版或排序重叠的工具注释很有用。如需了解详情,请转到注释工具。
在发起有线传出连接和发起无线传出连接之间切换,以更改连接显示方式。具有无线连接的输入和输出锚点会显示无线连接图标,该图标带有彩色条,它表示某个锚点的传入或传出连接的数量(除非选择了工具,否则连接线是不可见的):
1 个彩色条代表 1 个连接。
2 个彩色条代表 2 个连接。
3 个彩色条代表 3 个或更多的连接。
转换为宏:将全部或部分工作流转换为宏。如需了解重要局限和说明,请转到转换为宏。
缓存并运行工作流:运行工作流并将所有数据缓存到所选工具。
缓存工具...
右键单击该工具。
选择缓存并运行工作流。Alteryx 可同时创建多个缓存点。你可以通过按住 Control 键并单击各个缓存点来处理多个缓存点。
注意事项和限制:
请注意,并非所有工具都可以进行缓存:
工具最多只能有 5 个输出锚点,并且它不能是循环流程的一部分。
不可以缓存库内工具、Machine Learning(机器学习)工具和 Python 工具。
你可以在单个工作流中使用多个缓存。
与缓存工具交互时,你可以在不清除缓存的情况下查看工具配置。但是,更改工具的配置会释放已缓存的数据。
关闭工作流时,Alteryx 会清除缓存。
清除缓存:清除缓存。清除工具的缓存...
右键单击该工具。
选择清除缓存。Alteryx 可同时清除多个缓存点。要分别清除一个或多个工具上的缓存,请选择一个或多个工具,然后单击鼠标右键以查看菜单。
运行直到选定工具:此选项仅通过 AMP 引擎提供,它使您能部分执行工作流,直至某个特定工具。在工作流的开发和测试阶段,此功能尤其有用,因为它允许您测试和修改特定部分,而无需运行整个工作流。
选择“运行直到选定工具”后,工作流会立即运行,并且工作流中选定工具之后的任何工具都显示为非活动状态。
您可以将此选项应用于工作流中的多个工具,只要这些工具属于不同的数据流即可。为此,请选择多个工具(按住 Ctrl 键并选择画布上的每个工具),右键单击其中一个选定的工具,然后选择“运行直到选定工具”。
此设置与缓存的工作流兼容。
要清除非活动工具叠加,请通过“运行”按钮或 Ctrl+R 键盘快捷键运行整个工作流。
转换为宏输入:将选定的输入工具转换为宏输入工具。
插入:选择要在所选工具后插入的工具。如需了解详情,请参阅工具类别。
后添加浏览工具:在所选工具后添加浏览工具。如果所选工具具有多个输出锚点,则将浏览工具添加至每个输出锚点的选项会出现。
Open Macro: If the tool is a macro, select this option to open the underlying macro in a new workflow tab. You can also double-click the tool on the canvas to open the macro.
属性:将焦点放在所选工具的配置窗口中。
选择 2 个或更多工具以查看对齐选项:
水平对齐:所选工具与所选工具中第一个放置在画布中的工具水平对齐。
垂直对齐:所选工具与所选工具中第一个放置在画布中的工具垂直对齐。
选择 3 个或更多工具以查看分布选项:
水平分布:排列所选工具使它们在水平轴之间具有均匀的空间。
垂直分布:排列所选工具使它们在垂直轴之间具有均匀的空间。
Tool Double-click Options
Certain tools on the workflow canvas give you quick access to additional features via a double-click. This option is available for the Browse tool and any tools that are macros:
Macros: Double-click the tool icon (on the canvas) for a tool that is a macro to open the underlying macro workflow in a new workflow tab and quickly inspect the macro details.
Browse tool: Double-click the Browse tool icon (on the canvas) to open the dataset in a new Results window and quickly investigate the workflow data.
对工作流进行注释
使用工具的配置窗口 > 注释选项向工具添加注释,或者向工作流添加“注释工具。如需了解详情,请参阅以下资源:
画布选项
运行工作流:运行工作流。用户也可以使用 Ctrl+R 运行工作流。工作流运行时,该图标更改为停止工作流。
停止工作流:停止工作流。用户也可以使用 Ctrl+R 停止工作流。
作为分析应用运行:运行分析应用程序。
将工作流添加到计划:计划在特定时间并以特定频率运行工作流。
活动文档:显示打开的工作流、应用程序或宏指令。
新建空白工作流:创建新工作流 (.yxmd)。
放大:将正常大小放大 3/2。
缩小:将正常大小缩小 2/3。
复制和粘贴
要控制画布的粘贴位置,请选择复制项,复制(Ctrl+C),选择要粘贴的位置,然后粘贴(Ctrl+V)。Designer 将复制项粘贴到与光标相同的点上。
保存文件
当您具有一个或多个未保存的工作流并尝试退出应用程序时,Designer 会提示您保存未保存的工作流。Designer 显示是否将所作的更改保存至以下工作流?消息并提供以下选项:
保存已选择项:选择要保存的工作流,然后选择保存已选择项。Designer 保存所选工作流并关闭。任何未选择的工作流都不会保存。
放弃更改:选择放弃更改将放弃所有更改,退出且不保存。
取消:选择取消可返回到画布。
