I have a Google Cloud Datastore backup on Google Cloud Storage and I would like to import it automatically into BigQuery.
TableDefinition tableDefinition = ExternalTableDefinition
.newBuilder(tableUri, Schema.of(), FormatOptions.datastoreBackup())
.setAutodetect(true)
.build();
return bigQuery.create(TableInfo.of(TableId.of("ds", tableName), tableDefinition));
This trows the following exception;
com.google.cloud.bigquery.BigQueryException: Specifying a schema is disallowed for STORAGE_FORMAT_DATASTORE_BACKUP
If I change Schema.of() to null it throws a null pointer. And all factory methods have a method signature which requires a scheme. How can I create this table as an external table via Java API?