我正在尝试显式创建Google BigQuery表架构,TableSchema.Fields.Add()方法抛出对象引用异常。
TableSchema Schema = response.Schema;
TableFieldSchema sc1 = new TableFieldSchema();
sc1.Name = "CustomerID";
sc1.Type = "STRING";
sc1.Mode = "NULLABLE";
Schema.Fields.Add(sc1); -- Throws Error.
答案 0 :(得分:0)
可以在此处找到插入具有指定模式的新表的Java示例:http://stackoverflow.com/questions/21183941/how-to-create-a-bigquery-dataset-and-a-table-schema-from-java-client-without-cs#answer-21201882