com.google.api.services.bigquery.model.TableRow.toString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中com.google.api.services.bigquery.model.TableRow.toString()方法的一些代码示例,展示了TableRow.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableRow.toString()方法的具体详情如下:
包路径:com.google.api.services.bigquery.model.TableRow
类名称:TableRow
方法名:toString

TableRow.toString介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

public void update() {
  String r = "{\"rows\": [";
  List<TableRow> bqresults;
  if (!this.sql.isEmpty()){
    try {
      Bigquery bq = createAuthorizedClient();
      bqresults = executeQuery(bq, this.sql);
      int rowIx = 0;
      int rowMax = bqresults.size() - 1;
      for(TableRow row : bqresults) {
        r += row.toString();
        rowIx++;
        if (rowIx <= rowMax) r += ",";
      }
      r += "]}";
      this.results = r;  
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

long addRow(TableRow row, String id) {
 rows.add(row);
 ids.add(id);
 long rowSize = row.toString().length();
 Long tableSize = table.getNumBytes();
 if (tableSize == null) {
  table.setNumBytes(rowSize);
 } else {
  table.setNumBytes(tableSize + rowSize);
 }
 return rowSize;
}

代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

rows.add(out);
dataSize += row.toString().length();
if (dataSize >= UPLOAD_BATCH_SIZE_BYTES
  || rows.size() >= maxRowsPerBatch

相关文章