Looker 错误目录

下表列出了 Looker 中出现的一些常见出错提示、其根本原因和发生位置的说明,以及问题排查资源。错误会按照向 Looker 支持团队报告的频率降序排列,支持请求数量最多的错误显示在顶部。

位置列会指明出错提示在 Looker 中的显示位置,并包含以下选项(某些出错提示可能会出现在产品中的多个位置):

IDE = LookML 验证器/IDE

Ex = 探索

SQL = SQL Runner

LD = LookML 信息中心

D = 信息中心

S = 时间表

出错提示 位置 可能的原因 问题排查资源
Variable not found (?). IDE
  • 用于变量引用的 Liquid {{ }} 嵌套在用于逻辑的 Liquid {% %} 中。
  • 模板化过滤条件引用了未联接到派生表的表。
  • Liquid 中引用的字段未完全限定视图名称 (view_name.field_name)。
  • 某个过滤条件的值在另一个 LookML 信息中心过滤条件中被引用。
  • parameter 参数的值与对应的 type 不兼容。例如:{% if parameters.change_value._parameter_value == "'AA'" %} 查看 parameter type,确保值计算正确(type: string 与 type: unquoted)。
  • 在 Liquid 中,字段被正确引用为 view_name.field_name,但 field_name 未在限定范围的视图 view_name 中定义,或者该视图在探索中被别名为 from。
  • 对变量的 Liquid 引用未定义,或引用包含拼写错误。
  • Liquid 引用包含 type: time 的维度组,但不包含特定时间范围。例如,引用应使用 {{ view_name.creation_date_year }},而不是 {{ view_name.creation_date }}。
  • 某个字段使用了带有 LookML 替换运算符语法的 Liquid (${view_name.field_name}),而不是不带该语法的 Liquid (view_name.field_name)。
Inaccessible view (?). (?) is not accessible in explore (?). Check for missing joins in explore (?). IDE
  • 引用的视图不存在。
  • 缺少联接,导致某些“探索”无法访问该视图。
  • 在探索中,使用 from 参数重命名视图。
Unknown or inaccessible field (?). Check for typos or append a timeframe to the name if the field is type time. IDE 错误 Inaccessible view (?). (?) is not accessible in explore (?). Check for missing joins in explore (?). 列出的任何可能原因都可能适用,此外还有以下原因:
  • 字段名称或对字段的引用中存在拼写错误。
  • 该字段通过 fields 参数从探索中排除。
  • 提及了dimension_group,但未指定时间范围。
Unknown view (?). IDE Ex SQL
  • 模型文件中不包含视图。
  • explore 正在扩展缺少 view_name 参数的基础 explore。
  • explore 参数中定义的探索名称基于拼写错误或不存在的视图名称。
  • 正在运行基于模型的 SQL Runner 查询,但所选模型不正确。
Unknown view (?). View does not exist in model (?). Check for typos or missing include statements. IDE Ex SQL
  • explore 正在扩展缺少 view_name 参数的基本 explore,并且任何联接视图中的字段都引用了基本 explore 名称。
  • 某个字段引用的视图拼写错误、不存在或未联接到适用的探索。
Unknown field (?) in filter IDE
  • 原生派生表 (NDT) 定义包含一个 bind_all_filters 参数,该参数位于未在 LookML 中定义的自定义字段上。
  • LookML 过滤条件引用了已注释掉或不存在的 LookML 字段。
  • LookML 过滤条件引用了其他视图中的 LookML 字段,但该字段未完全限定范围,也未联接到所有相关的 explore 参数。
Measures with Looker aggregations (sum, average, min, max, list types) may not reference other measures. IDE 在另一个聚合类型测量的 SQL 定义中引用了某个测量。
Unknown view (?). View (?) does not exist in model (?). Check for typos or missing include statements in (?). IDE 视图未包含在模型文件中,或者包含在模型文件中但拼写错误。
Can't construct persistent derived table (?), connection (?) could not be registered IDE Ex
  • 现有 PDT 的任何依赖项都未能构建。
  • 连接存在问题,需要通过测试连接进行诊断(例如,测试连接可能会发现 Looker 用户可能没有足够的数据库所有权或写入权限)。
  • 导入的项目不包含导入的项目文件,例如定义失败 PDT 的视图或失败 PDT 引用的视图。
  • 数据库连接未启用永久性派生表设置。
  • Looker 组成块的代码尚未更新为连接的 SQL 方言(如果与编写组成块时使用的方言不同)。
  • 为 Snowflake 或 BigQuery 连接启用了 OAuth。
  • 已为 Snowflake 数据库 AUTOCOMMIT 参数设置了默认值 TRUE 以外的值。
Unknown or excluded suggest_dimension (?) in field (?) IDE
  • suggest_dimension 参数引用的字段不存在、已被注释掉,或在探索中被 fields 参数排除。
  • suggest_dimension 参数引用的字段在另一个视图中定义,但在引用中未完全限定为 view_name.field_name。
  • suggest_dimension 参数引用了其他视图中的字段,该视图未联接到所有相关 explore 参数,或者在 explore 中使用 from 参数设置了别名。
A view named (?) has been defined multiple times. Each view in a model must have a unique name. IDE 在同一模型中引用了名称相同的视图,包括导入到项目中的视图。视图名称在模型中必须是唯一的。 view 参数参考文档
This include does not match any files IDE
  • 文件路径中的拼写错误导致了错误。
  • 文件夹引用使用的语法不正确。
  • 项目导入引用使用的语法不正确。
SQL Dialect does not support Symmetric Aggregates with percentiles, field ignored. Ex 数据库方言不支持使用对称聚合的 type: median 或 type: percentile 测量。
Cannot use native derived table (?) with bind_all_filters outside of its source explore (?) IDE Ex 具有 bind_all_filters 参数的原生派生表 (NDT) 会联接到一个或多个探索,而不是 explore_source 参数中定义的探索。 使用 bind_all_filters
Measures of type count do not use the sql parameter. Use count_distinct to count by something other than the primary key, or remove the sql parameter. IDE sql 参数用于 type: count 的测量。计数类型测量会根据视图文件中声明的主键执行计数,不需要 sql 参数。
An explore named (?) has been defined multiple times. Each explore in a model must have a unique name. IDE LD
  • 模型文件的 explore 参数中定义的探索名称与另一个现有探索名称重复。探索名称在模型中必须是唯一的。
  • 导入的项目中有一个 explore,其名称与导入项目中的现有 explore 相同。
  • 被包含的模型文件具有与包含它的项目模型文件中的现有 explore 同名的 explore。*
  • 代码中存在循环引用,多次引用了 explore(或模型文件)。
* 在其他模型文件中包含模型文件并非最佳实践。
Unknown view '(?)' --> Did you '- include: (?)' in (?).model.lookml? IDE
  • 模型包含视图文件夹,但特定视图文件位于该文件夹之外。
  • 模型包含视图的名称,但不包含视图文件(如果名称不同)。
  • 一个视图多次联接到 explore,但在第二次联接时缺少 from 参数。
Unknown field '(?)' IDE Ex
  • 您尝试引用的字段不存在、拼写错误或已被注释掉。
  • 引用的字段在其他视图中定义,且未限定其视图名称。
  • 字段是在其他视图中定义的,该视图未联接到必要的探索中,或者该视图在联接中使用了别名,导致某些探索无法访问该字段。
  • required_fields 参数引用的字段无法访问、拼写错误、不存在或已被注释掉。
Cannot use (?) as access filter since any user can edit their own value. Ex 在探索的 access_filter 参数中使用了用户访问权限选项设置为修改的用户属性。
label_from_parameter of (?) must refer to a parameter. IDE Ex
  • label_from_parameter 参数引用的字段不存在、拼写错误或已被注释掉。
  • label_from_parameter 参数引用的字段存在,但不是 parameter 类型。
Cannot use user-editable attribute (?) for access_grant (?) IDE Ex 在模型文件的 access_grant 参数中使用了用户访问权限选项设置为修改的用户属性。
datagroup (?) has a sql_trigger. This is not allowed in models with a parameterized connection. IDE 数据库连接使用用户属性作为数据库登录凭证,并且未针对 PDT 进程的单独数据库用户配置 PDT 替换列。
relationship missing, assumed to be many_to_one. IDE 未定义联接的 relationship。如果未指定 relationship,Looker 默认会假定关系为 many-to-one。 relationship 参数参考文档
No distribution_style specified in persistent derived table (?). Using default distribution style (?). IDE Redshift 连接 PDT 的 derived_table 定义中未指定 distribution_style 参数。如果未指定 distribution_style,Looker 会默认使用 ALL。 distribution_style 参数参考文档
always_filter: unknown filter field '(?)' IDE
  • always_filter 参数引用的字段不存在、拼写错误或已被注释掉。
  • always_filter 参数引用的字段是 type: time 的 dimension_group,未附加时间范围。
  • always_filter 参数引用的字段是在视图中定义的字段,该视图未联接到所有相关 explore 参数中,或者该字段未限定其视图名称。
The location field type requires both sql_latitude and sql_longitude. IDE type: location 的某个字段缺少 sql_latitude 或 sql_longitude 子参数。位置类型字段需要同时提供这两个字段。 location 字段类型参考
Missing required sql_step in create_process of derived table '(?)'. IDE
  • create_process 中未指定 sql_step,而该参数需要一个或多个 sql_step 子参数。
  • 缓存的 LookML 验证器错误标记了缺失的 sql_step,即使 sql_step 已添加。再次验证以解决错误。
create_process 参数参考文档
Can't construct aggregate table (?), temporary schema for (?) is unset. IDE Ex 未在管理控制台面板的连接设置页面上为连接设置永久性派生表设置,和/或未在临时数据库设置中指定临时数据库架构。
Can't construct aggregate table (?), connection (?) could not be registered. IDE Ex 管理面板中连接的连接设置页面上未设置临时数据库设置,或者 Looker 对临时数据库设置中指定的临时数据库没有适当的权限。
Unknown view (?) referenced by explore (?) IDE
  • 使用默认 include: "*.view.lkml" 包含视图,但视图位于其他文件夹中。
  • include 语句中的视图名称或文件路径拼写错误,或者 include 语句包含视图名称,但不包含视图文件(如果名称不同)。
  • 文件夹中的特殊字符(例如 _views)存在问题。
  • 某个 explore 正在扩展另一个 explore,而后者缺少指定基础视图的 view_name 参数。
The location field type does not use the sql parameter. Please use sql_latitude and sql_longitude instead. IDE sql 参数用于 type: location 的字段中。位置类型字段需要 sql_latitude 和 sql_longitude 子参数,而不是 sql 参数。 location 字段类型参考
A list_field must be defined for measures of type list. IDE Ex 如需从字段生成列表,必须为 type: list 的测量指定该字段。 list 字段类型参考文档
Query failed with unexpected exception (?) IDE Ex SQL LD D S
  • 在管理控制台面板中,连接的连接设置页面上的 PDT 替换列中指定了主连接数据库以外的数据库。
  • 已超出每位用户的查询限制,并且已加入队列的查询已达到连接池超时。
  • JDBC 连接失败。
  • 发生了意外的 Looker 应用故障。
Looker is having trouble connecting to your database. Ex SQL 已达到连接的连接池上限,并且排队的查询在连接池超时窗口过后已超时。
SQL Error in incremental PDT: Query execution failed Ex D S 基于 SQL 的增量 PDT 中引用的一个或多个表的底层架构已发生更改。 架构更改后,增量 PDT 无法构建
Missing dates/values for '(?)' were not filled. Ex
  • 无法应用维度填充,因为在“探索”中选择了多个维度。
  • 由于一个或多个字段在“探索”中进行了透视,因此无法应用维度填充。
  • 由于某个字段具有不同的字符串值(例如 allowed_value 或 case 参数),并且该字段应用了过滤条件,因此无法应用维度填充。
填充缺失的日期和值
filters: ` is not supported for measures of non-aggregate type '(?)' IDE Ex filters 参数与以下类型以外的任何测量类型一起使用:count、sum、average 和 count_distinct。
Unknown source explore (?) in lookml test (?) declaration. IDE
  • 在数据测试的 explore_source 子参数中使用了拼写错误、不存在或已注释掉的探索名称。
  • 数据测试是在一个文件中定义的,该文件不包含包含探索的 explore_source 定义的文件,也不包含在其中。
  • 具有 extension: required 参数规范的探索用作数据测试的 explore_source。
filter_expression: is not supported for measures of non-aggregate type '(?)' IDE Ex filters_expression 参数与以下类型以外的任何测量类型搭配使用:count、sum、average 或 count_distinct。
Field references an aggregate but is specified as a dimension. If you want to use aggregations such as sum, average, count, use a measure type instead. IDE Ex 维度在其 sql 参数中引用了测量或其他聚合
Cannot specify both sql_table_name and derived_table for view (?) IDE 视图同时定义了 sql_table_name 和 derived_table 参数。视图只能引用一个表,可以是数据库连接中已有的架构(使用 sql_table_name),也可以是新表(使用 derived_table)。
Persistent Native Derived Table for view (?) has an explore source (?) that has access filters. Persisting this table may result in unexpected behavior. IDE 持久化 NDT 基于具有引用用户属性的 access_filter 参数的探索。
Unknown or unexpected parameter "(?)" in (?). IDE
  • distribution_style 参数用于不支持该参数的方言
  • cluster_keys 参数用于不支持该参数的方言
  • sql_always_where 参数是在 join 中定义的,而不是在 explore 中定义的。
  • dimension_group 中定义的时间范围不是 type: time。
  • sql_distinct_key 参数是在维度(而非测量)中定义的。
Could not find the constant IDE 常量在导入项目中被引用,但仅在被导入项目中定义。常量只能在定义它们的项目中引用。需要在清单文件中重新定义常量。 在导入的项目中的文件内使用常量
Multiple primary key definitions for view '(?)': '(?)' and '(?)' IDE 视图文件中存在多个主键。使用 primary_key: yes 将多个维度指定为主键,或者扩展视图使用 primary_key: yes 将新维度指定为主键。
Persistent Native Derived Table for view (?) references user attributes. Persisting this table may result in unexpected behavior. IDE 持久化 NDT 或汇总感知表基于 explore,其中 access_filter 或 sql_always_where 参数引用用户属性。
No map layer named (?) is defined. Must be one of countries, uk_postcode_areas, us_counties_fips, us_states, us_zipcode_tabulation_areas IDE 如果包含字段视图的所有模型中均未定义地图图层,则维度会引用具有 map_layer_name 的地图图层。例如,一个视图包含在多个模型中,但地图图层仅在一个模型中定义。
Persistent derived table (?) should include at least one index IDE PDT 或汇总表格定义包含一个 index,其中未指定 PDT 或汇总表格列。
The x database encountered an error while running this query. Ex SQL 数据库找不到字段的 sql 参数引用的列。这可能是由以下某种情况导致的:
  • sql 参数中引用的表或列名称存在拼写错误。
  • 数据库中的底层数据(例如列名称)已更改。
Looker 中常见 SQL 错误的问题排查提示(社区帖子)
Render job (?) failed [orphaned job] S 在预定作业运行期间,Looker 实例不可用。这可能会在版本更新和计划内维护期间发生。 Looker 托管服务的 Google 维护政策