本文說明如何解決 Dataform 的問題。
存取 BigQuery 的要求遭拒
在授予 Dataform BigQuery 存取權之前觸發管道呼叫時,會發生下列錯誤:
Access Denied: Project PROJECT_ID: User does not have bigquery.jobs.create permission in project PROJECT_ID.
如要解決這項錯誤,請授予 Dataform BigQuery 存取權。
遠端存放區的存取權杖遭拒
如果已連結第三方存放區的驗證權杖無法存取該存放區,就會發生下列錯誤:
The access token for remote repository REPOSITORY_NAME was rejected
如要解決這個錯誤,請檢查 Git 供應商中的必要權限,並據此更新 Secret Manager 驗證權杖。如要進一步瞭解如何在 Dataform 中驗證第三方 Git 存放區,請參閱「連線至第三方 Git 存放區」。
超出 BigQuery 查詢並行上限
如果同時對 BigQuery 執行的查詢數量超出 BigQuery 查詢並行限制,就會發生下列錯誤:
Exceeded rate limits: too many concurrent queries for this project_and_region
如要解決這項錯誤,請透過下列方式,將並行查詢數量減少至 250 以下:
- 在 Dataform 中,使用標記將動作分類,並一次只執行所選標記。
- 在 Dataform 中,導入動作之間的依附元件。
- 在 Dataform 中,將動作的執行作業劃分到不同Google Cloud 專案。
如要瞭解如何在 BigQuery 中解決這項錯誤,請參閱「排解配額和限制錯誤」。
已超過 BigQuery 配額
如果 Dataform 傳送至 BigQuery 的 API 要求數量超過 BigQuery 配額,就會發生下列錯誤:
Quota exceeded: Your user_method exceeded quota for concurrent api requests
per user per method.
如要解決這項錯誤,請透過下列方式,將並行查詢數量減少至 250 以下:
- 在 Dataform 中,使用標記將動作分類,並一次只執行所選標記。
- 在 Dataform 中,導入動作之間的依附元件。
- 在 Dataform 中,將動作的執行作業劃分到不同Google Cloud 專案。
如要瞭解如何在 BigQuery 中解決這項錯誤,請參閱「排解配額和限制錯誤」。
BigQuery pipeline 叫用錯誤
將工作流程執行至 BigQuery 時,會發生下列錯誤:
如要解決這些錯誤,請參閱「BigQuery 錯誤訊息」一文。
編譯失敗
由於編譯的查詢大小或數量,編譯期間會發生下列錯誤:
Compilation timed out. Reduce the complexity of your project to ensure it can compile within limits.Compilation exceeded its allowed heap memory limits. Reduce the complexity of your project to ensure it can compile within limits.Compilation exceeded its allowed ArrayBuffer or string memory limits. Reduce the complexity of your project to ensure it can compile within limits.
如要解決這些錯誤,請按照下列步驟操作:
- 將 Dataform 核心更新至最新版本。
- 檢查工作流程,找出並減少效率不彰之處。
- 縮減 SQL 查詢的大小。
減少記憶體中的 JavaScript 作業量,例如:
config { config {type: "table" }} js { const tooBig = new Uint8Array(110_000_000); } SELECT ...
如要進一步瞭解 Dataform 編譯資源限制,請參閱「配額與限制」。
相衝突的「includeDependentAssertions」屬性
如果一個檔案中,同一個動作的 includeDependentAssertions 參數設有不同值,編譯期間就會發生下列錯誤:
Conflicting "includeDependentAssertions" properties are not allowed. Dependency
dependencyName has different values set for this property.
如要解決這個錯誤,請編輯檔案並移除重複的 includeDependentAssertions 參數。
如要進一步瞭解如何使用 includeDependentAssertions 參數將斷言設為依附元件,請參閱「將所選動作的斷言設為依附元件」。
系統會封鎖跨專案服務帳戶連結
如果您嘗試使用與 Dataform 存放區不同專案的自訂服務帳戶,且作業遭到機構政策限制封鎖,就會發生下列錯誤:
The caller does not have permission to act as service account: SERVICE_ACCOUNT_EMAIL
如要解決這項錯誤,請按照下列步驟操作:
- 找出自訂服務帳戶所在的 Google Cloud 專案。
- 在該專案中,停用
iam.disableCrossProjectServiceAccountUsage機構政策限制。詳情請參閱「啟用服務帳戶,以便跨專案附加」。 - 確認呼叫端主體具備自訂服務帳戶的服務帳戶使用者角色 (
roles/iam.serviceAccountUser)。
詳情請參閱「處理跨專案服務帳戶附件」。
@dataform/core 依附元件錯誤
如果 package.json 中的 dataform-core 依附元件過時,編譯期間會發生下列錯誤:
Failed to resolve @dataform/core
@dataform/core version should be X.X.X or newer
package.json 中必須有 @dataform/core 依附元件。在存放區中初始化第一個工作區時,Dataform 會自動在 package.json 中填入 @dataform/core 的目前版本。請務必將 @dataform/core 更新至最新版本。
如要解決這類問題,請將 @dataform/core 更新至最新版本。
使用者憑證權限遭拒
使用 Google 帳戶的使用者憑證執行工作負載時,如果 Dataform 沒有必要權限,就會發生下列錯誤:
Dataform does not have the necessary permissions to run your workload using end user credentials. Error details: Account restricted: https://accounts.google.com/info/servicerestricted?...
如果貴機構使用情境感知存取權規則,根據使用者身分和情境限制對 Google Cloud 服務的存取權,就可能發生這個錯誤。
如要解決這項錯誤,您可能需要更新情境感知存取權設定,允許 Dataform 使用 Google 帳戶使用者憑證。如要執行這項操作,您需要在存取層級設定中,豁免 Dataform 的 OAuth 用戶端 ID。如要瞭解如何豁免應用程式,請參閱「為支援的應用程式設定存取層級」。
如要取得 Dataform 的 OAuth 用戶端 ID,請與 Cloud Customer Care 聯絡。
無法解決「dataform.json」
初始化 Dataform 工作區時,如果初始化程序無法安裝所有套件,就會發生下列錯誤:
Uncaught Error: Failed to resolve dataform.json
如要解決這個錯誤,請在工作區中開啟 package.json,然後按一下「安裝套件」。
無法解決「workflow_settings.yaml」
初始化 Dataform 工作區時,如果初始化程序無法安裝所有套件,就會發生下列錯誤:
Uncaught Error: Failed to resolve workflow_settings.yaml
如要解決這項錯誤,請在工作區中開啟 workflow_settings.yaml,然後按一下「安裝套件」。
不支援 git+ 套件目標
在 package.json 中定義套件時,如果目標以 git+ 為前置字元,就會發生下列錯誤:
'git+' prefixed package targets are not currently supported. However,
in most cases they can be used via a '.tar.gz' suffixed target instead.
Dataform 不支援以 git+ 為前置字元的套件目標。