We should add functional classes (Dataset, Table and Job) to gcloud-java-bigquery, to make using the library easier. Functional classes should allow something like:
// get an existing datasetDatasetdataset = Dataset.load(bigquery, "my_dataset_id");
// create a tableTabletable = dataset.create("my_table_id", Schema.of(field1, field2));
// copy a tableJobcopyJob = table.copy(TableId.of("my_dataset_id", "my_copy_table_id");
// cancel a jobcopyJob.cancel();
// load data into the tableJobloadJob = table.load(FormatOptions.csv(), ImmutableList.of("gs://my-bucket/my-file.csv"));
// wait for job to completewhile (!loadJob.isDone()) {
loadJob = loadJob.reload();
Thread.sleep(1000);
}Comments are welcome:)
/cc @jtigani
We should add functional classes (
Dataset,TableandJob) to gcloud-java-bigquery, to make using the library easier. Functional classes should allow something like:Comments are welcome:)
/cc @jtigani