group_label(适用于探索)

此页面涉及 探索的一部分 group_label 参数。

group_label 也可以用作字段的一部分,如 group_label(针对字段)参数文档页面中所述。

用法

explore: explore_name {
  group_label: "Label to Use as a Heading in the Explore Menu"
}
层次结构
group_label
默认值
如果未定义 group_label,探索会按模型分组,每个字词的首字母大写,下划线替换为空格

接受
一个字符串

定义

使用 group_label 更改“探索”菜单的默认组织方式。group_label 参数用于指定要在“探索”菜单中用作相应探索标题的标签。

您可以将探索列在新的群组标签下或另一个模型的名称下,而不是将每个探索都列在其所属模型的名称下。如果您向多个探索添加相同的 group_label,则这些探索将全部列在“探索”菜单中的同一标题下。您可以使用 group_label 将探索归为一组,即使它们是在不同的项目中定义的也是如此。

如果您使用其他模型的名称作为探索的 group_label 参数的值,则该探索将与属于该模型的任何探索一起列出。如果您为 group_label 参数指定的值与模型名称不对应,Looker 会将该新标签作为标题添加到“探索”菜单中。

示例

在“探索”菜单中创建一个名为 Online Store Queries 的组标题,并在“探索”菜单中将客户探索列在该标题下:

explore: customers {
  group_label: "Online Store Queries"
}

通过向两个不同的探索添加群组标签,您可以将它们归入 Online Store Queries 标签下。在以下 LookML 示例中,group_label 参数与 order_items 探索和 inventory 探索搭配使用:

explore: order_items {
  label: "Order Items"
  description: "Based on the individual items that compose customer orders"
  group_label: "Online Store Queries"
  ...
}

explore: inventory {
  group_label: "Online Store Queries"
  ...
}

然后,Order ItemsInventory 探索将在“探索”菜单中的 Online Store Queries 标签下列出。

注意事项

除了更改“探索”菜单的外观之外,group_label 不会产生任何其他效果

更改探索group_label 时,只会影响“探索”菜单中的探索标题。如需更改探索本身的显示名称,请使用 label 参数。

字段在 LookML 中的引用方式保持不变。字段在“探索”界面中的显示方式也保持不变。