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 }}。
  • 欄位使用 Liquid 時,採用 LookML 替換運算子語法 ${view_name.field_name},而非 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) 定義包含 LookML 未定義的自訂欄位 bind_all_filters 參數。
  • 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 overrides」(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 子參數。
  • 即使已新增 sql_step,快取的 LookML 驗證工具錯誤仍會標記缺少的 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 維護政策