如何使用C#库加载架构?我在Python上找到了一篇文章,人们可以调用table.reload()来实际加载模式。但我在C#库中找不到任何类似的功能。
BigQueryClient bqClient = BigQueryClient.Create(projectId);
var ds = bqClient.GetDataset(dataset);
var tableList = ds.ListTables();
foreach (var table in ds.ListTables())
{
//here I need table schema to work on, but schema is null
}
答案 0 :(得分:2)
我认为你需要这样的东西:
BigQueryClient bqClient = BigQueryClient.Create(projectId);
var ds = bqClient.GetDataset(dataset);
var tableList = ds.ListTables();
foreach (var table in ds.ListTables())
{
//here I need table schema to work on, but schema is null
BigQueryTable table = bqClient.GetTable(datasetId, tableId);
TableSchema schema = table.Schema;
}