簡體   English   中英

在 Google DataFusion 的 bigquery 架構中使用 arguments

[英]Using arguments in bigquery schema for Google DataFusion

我正在嘗試在 Bigquery 接收器插件的 bigquery 模式定義中使用運行時 arguments。 它只是兩列。 參數 setter.json 中的定義。 -

{
  "arguments" : [
   {"name":"bq.config.table","value":"activity_category"},
   
   {
   "name" : "sqloutput_schema",
   "type" : "schema",
   "value" : 
    [
    {"name":"activity_category_id","type":"string","nullable":true},
    {"name":"activity_category_description","type":"string"}
    ]
    }
   
  ]
}

問題出在“sqloutput_schema”中,它在運行時失敗 - 插件的 PFA 屏幕截圖:- 在此處輸入圖像描述

收到錯誤 - Spark program 'phase-2' failed with error: Argument 'sqloutput_schema' is not defined.Please check the system logs for more details. io.cdap.cdap.api.macro.InvalidMacroException: Argument 'sqloutput_schema' is not defined. Spark program 'phase-2' failed with error: Argument 'sqloutput_schema' is not defined.Please check the system logs for more details. io.cdap.cdap.api.macro.InvalidMacroException: Argument 'sqloutput_schema' is not defined.

我找不到解決失敗原因的解決方案。

問題是您的模式定義。 我有相同的用例,我的參數是字符串類型,值具有以下格式 -

"{\"name\":\"etlSchemaBody\",\"type\":\"record\",\"fields\":
[
{\"name\":\"Id\",\"type\":\"int\"},
{\"name\":\"name\",\"type\":\"string\"}
]}"

因此,按照上面的格式更改模式的參數類型和模式 json。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM