【发布时间】:2022-08-17 02:55:57
【问题描述】:
我想使用 Google Workflows(YAML 格式)将数据从 API 发送到 BigQuery 表。 但我要发送到 BigQuery 表的 API 响应与“insertAll”BigQuery 连接器功能不匹配。
main:
params: [input]
steps:
- retrieveMatomoData:
call: http.get
args:
url: https://.....
result: matomoData
- insertAll:
call: googleapis.bigquery.v2.tabledata.insertAll
args:
datasetId: myDatasetId
projectId: myProjectId
tableId: myTableId
body:
\"rows\": [
{
json: should be the full \"matomoData\" response
}
]
我使用的 API 的响应结构是:
{
\"body\": [
{
…
},
{
…
}
]
(这是一个对应于要插入的几行的数组) 它与在 Bigquery 中插入行的结构不匹配:
\"rows\": [
{
json: …
},
json: …
]
你知道我该如何处理吗?
标签: google-bigquery yaml google-workflows