code: public long writeFileToTable(String datasetName, String tableName, Path csvPath, String location)
        throws IOException, InterruptedException, TimeoutException {
      // [START bigquery_load_from_file]
      TableId tableId = TableId.of(datasetName, tableName);
      WriteChannelConfiguration writeChannelConfiguration =
          WriteChannelConfiguration.newBuilder(tableId).setFormatOptions(FormatOptions.csv()).build();
      // The location must be specified; other fields can be auto-detected.
      JobId jobId = JobId.newBuilder().setLocation(location).build();
      TableDataWriteChannel writer = bigquery.writer(jobId, writeChannelConfiguration);
      // Write data to writer
      try (OutputStream stream = Channels.newOutputStream(writer)) {
        Files.copy(csvPath, stream);
      } finally {
        writer.close();
      }
      // Get load job
      Job job = writer.getJob();
      job = job.waitFor();
      LoadStatistics stats = job.getStatistics();
      return stats.getOutputRows();
      // [END bigquery_load_from_file]
    }
docs: [VARIABLE "us"]