Hi there,
I must be missing something, I am trying to create a simple, empty dataset using the API but nothing is working. I first tried the following code using the Java API:
Datasetreference ref = new Datasetreference();
ref.setProjectId(PROJECT_ID);
Dataset dataset = new Dataset();
dataset.setDatasetReference(ref);
dataset = bigquery.datasets().insert(dataset).execute();
System.out.println("dataset=" + dataset);
but I get a GoogleJsonResponseException: 404 Not Found with no detail on what the error is or what is "not found" . I tried to add a dataset id to the Datasetreference object, and various combinations of parameters in the Dataset object, but I consistently get this 404 Not Found.
Note that the bigquery object I'm using is working fine for retrieving the list of datasets for example, so the error is really specific to the "insert" operation.
After that I tried to create the dataset manually by using the Web client (using the "Try it" button on the page
https://developers.google.com/bigquery/docs/reference/v2/datasets/insert ). On this page I get a different error, which seems to indicate that I am missing a required parameter. However, according to the documentation, only the "projectId" parameter is mandatory. So I don't see what is missing here....
400 Bad Request
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required"
}
],
"code": 400,
"message": "Required"
}
}
Thanks in advance for your help
Stéphane