-1
appengineのbigqueryにデータをアップロードしようとしています。ここappengineからbigqueryにアップロードするときに未知の値を無視する方法
は今、どのように私は大きなクエリignoreUnknownValuesを作ることができ、このstreaming sample
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String projectId = "myprojectId";
String datasetId = "mydatasetId";
String tableId = "person";
System.out.println("Enter JSON to stream to BigQuery: \n" + "Press End-of-stream (CTRL-D) to stop");
String string = "[\n {\"Name\": \"test\", \"Age\": 0, \"Weight\": 100.0, \"IsMagic\": false},\n {\"Name\": \"test\", \"Age\": 1, \"Weight\": 100.0, \"IsMagic\": false},\n {\"Name\": \"test\", \"Age\": 2, \"Weight\": 100.0, \"IsMagic\": false},\n {\"Name\": \"test\", \"Age\": 3, \"Weight\": 100.0, \"IsMagic\": false},\n {\"Name\": \"test\", \"Age\": 0, \"Weight\": 100.0, \"IsMagic\": false}\n]";
JsonReader jsonReader = new JsonReader(new StringReader(string));
Iterator<TableDataInsertAllResponse> responses = StreamingSample.run(projectId, datasetId, tableId, jsonReader);
while (responses.hasNext()) {
log.info(responses.next());
}
jsonReader.close();
}
からAPIを使用して私のコードですか? 私はそれに使用できるライブラリがありますか?