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: stringtype: 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 參照的檢視畫面) 不會納入匯入專案。
  • 資料庫連線未啟用「Persistent Derived Tables」設定。
  • 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: mediantype: 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: timedimension_group,但沒有附加時間範圍。
  • always_filter 參數參照的欄位,是指在未加入所有相關 explore 參數的檢視畫面中定義的欄位,或是未以其檢視畫面名稱設定範圍的欄位。
The location field type requires both sql_latitude and sql_longitude. IDE type: location 欄位缺少 sql_latitudesql_longitude 子參數。位置類型欄位需要兩者。 location 欄位類型參考資料
Missing required sql_step in create_process of derived table '(?)'. IDE
  • create_process 中未指定 sql_step,而 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 會擴充另一個缺少指定基礎檢視畫面的 view_name 參數。explore
The location field type does not use the sql parameter. Please use sql_latitude and sql_longitude instead. IDE sql 參數會用於 type: location 的欄位。地點類型欄位需要 sql_latitudesql_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_valuecase 參數),且該欄位已套用篩選器,因此無法套用維度填入。
填入缺少的日期和值
filters: ` is not supported for measures of non-aggregate type '(?)' IDE Ex filters 參數與下列以外的任何測量類型搭配使用:countsumaveragecount_distinct
Unknown source explore (?) in lookml test (?) declaration. IDE
  • 在資料測試的 explore_source 子參數中使用拼錯、不存在或註解掉的探索名稱。
  • 在未包含 Explore explore_source 定義的檔案中定義資料測試。
  • 含有 extension: required 參數規格的 Explore 會用於資料測試的 explore_source
filter_expression: is not supported for measures of non-aggregate type '(?)' IDE Ex filters_expression 參數與下列以外的任何測量類型搭配使用:countsumaveragecount_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_namederived_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 是以 Explore 為基礎,其中包含參照使用者屬性的 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_filtersql_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 維護政策