douqiao1413 2018-05-15 03:01
浏览 81
已采纳

获取将BigQuery结果存储到Google云端存储的作业的进度或状态

I can create & run a GCP job [using PHP API] to query a Google BigQuery dataset and export/save the result set as CSV file to the Google Cloud Storage GCS.

This works fine, but when the result set is huge, it takes a while to move the data to the GCS.

Is there a way to get the progress or estimated time of completion ?

Or alternately any method to find out how many MB/GB of data has been successfully moved to GCS so far?

  • 写回答

1条回答 默认 最新

  • drll42469 2018-05-15 09:05
    关注

    It’s not possible to retrieve information about the quantity of data transferred or the estimated time that the job will finish, however using the BigQuery Client Library for PHP you can request the id of currently running jobs. For example:

    $bigQuery = new BigQueryClient([
        'projectId' => $projectId,
    ]);
    
    $jobs = $bigQuery->jobs([
        'stateFilter' => 'running'
    ]);
    
    foreach ($jobs as $job) {
          echo $job->id() . PHP_EOL;
    }
    

    In this way you can ensure that your job is still underway.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!