无法使用C#在BigQuery中创建新的TableSchema

时间:2015-06-15 13:23:47

标签: google-bigquery google-api-dotnet-client

我正在尝试显式创建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.

1 个答案:

答案 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