Perl 中的 BigQuery:将查询数据附加到 table

BigQuery in Perl: append query data to table

我正在使用 Perl 来驱动 BigQuery,我正在尝试插入一个作业,该作业将从查询结果中填充 table。我收到的错误是 "Required parameter is missing"。那是哪个参数? (如果错误信息更具体一点就好了)

代码如下:

$response = $bq->request(
resource => 'jobs',
method => 'insert',
content => {
    configuration => { 
        query => {
        query => $query,
        destinationTable => {
            project_id => $project_id,
            dataset_id => $dataset_id,
            tableId => $table_id,
        },
        createDisposition => "CREATE_IF_NEEDED",
        writeDisposition => "WRITE_APPEND",
        allowLargeResults =>"TRUE",
        },
    },
},
async => $async,
);

请注意,如果我跳过 destinationTable 部分,代码可以正常工作,但它会将结果放在临时 table 中。所以这有效:

$response = $bq->request(
resource => 'jobs',
method => 'insert',
content => {
    configuration => { 
        query => {
        query => $query,
        createDisposition => "CREATE_IF_NEEDED",
        writeDisposition => "WRITE_APPEND",
        },
    },
},
async => $async,
);

有什么想法吗?不要因为这是 Perl 而被推迟,它的行为方式与 Python 相同,只是格式不同。

尝试:

    destinationTable => {
        projectId => $project_id,
        datasetId => $dataset_id,
        tableId => $table_id,
    },