// [END create_dataset] // [START create_table] public void CreateTable(string datasetId, string tableId, BigqueryClient client) { var dataset = client.GetDataset(datasetId); // Create schema for new table. var schema = new TableSchemaBuilder { { "title", BigqueryDbType.String }, { "unique_words", BigqueryDbType.Integer } }.Build(); // Create the table if it doesn't exist. BigqueryTable table = dataset.GetOrCreateTable(tableId, schema); }
public void TestQuickStartConsoleApp() { string output; string filePath = "..\\..\\..\\Quickstart\\bin\\Debug\\QuickStart.exe"; string expectedOutputFirstWord = "Dataset"; string expectedOutputLastWord = "created."; string sampleDatasetUsedInQuickStart = "my_new_dataset"; output = GetConsoleAppOutput(filePath).Trim(); var outputParts = output.Split(new[] { ' ' }); Assert.Equal(outputParts.First(), expectedOutputFirstWord); Assert.Equal(outputParts.Last(), expectedOutputLastWord); //Delete QuickStart testing Dataset if it exists var dataset = _client.GetDataset(sampleDatasetUsedInQuickStart); if (dataset != null) { DeleteDataset(sampleDatasetUsedInQuickStart, _client); } ; }