[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eTableSchemaBuilder\u003c/code\u003e class within the Google Cloud BigQuery v2 API for .NET, which is designed to simplify the creation of \u003ccode\u003eTableSchema\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTableSchemaBuilder\u003c/code\u003e class implements \u003ccode\u003eIEnumerable\u003c/code\u003e to facilitate its use in collection initializers, and it inherits basic functionalities like \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e from the \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTableSchemaBuilder\u003c/code\u003e allows for the addition of fields to a schema using methods such as \u003ccode\u003eAdd(TableFieldSchema)\u003c/code\u003e, \u003ccode\u003eAdd(string, TableSchema, BigQueryFieldMode, string)\u003c/code\u003e, and \u003ccode\u003eAdd(string, BigQueryDbType, BigQueryFieldMode, string)\u003c/code\u003e, which offer various options for defining field properties like name, type, mode, and description.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBuild()\u003c/code\u003e method is used to finalize and construct a \u003ccode\u003eTableSchema\u003c/code\u003e object from the fields that have been added to the \u003ccode\u003eTableSchemaBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eModifyField\u003c/code\u003e method enables the modification of a specific field within the schema by using a field name as parameter, along with a user defined action, and it allows method chaining.\u003c/p\u003e\n"]]],[],null,["# Google BigQuery v2 API - Class TableSchemaBuilder (3.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.11.0 (latest)](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.10.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.9.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.8.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.7.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.6.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.5.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.4.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.3.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.2.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.1.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/3.0.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/2.4.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/2.3.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/2.2.0/Google.Cloud.BigQuery.V2.TableSchemaBuilder) \n\n public sealed class TableSchemaBuilder : IEnumerable\n\nReference documentation and code samples for the Google BigQuery v2 API class TableSchemaBuilder.\n\nClass making it simple to create a [TableSchema](https://googleapis.dev/dotnet/Google.Apis.Bigquery.v2/1.68.0.3400/api/Google.Apis.Bigquery.v2.Data.TableSchema.html). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TableSchemaBuilder \n\nImplements\n----------\n\n[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.BigQuery.V2](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.BigQuery.V2.dll\n\nRemarks\n-------\n\nThis class only implements [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable) in order to allow it to be used in\ncollection initializers.\n\nMethods\n-------\n\n### Add(TableFieldSchema)\n\n public void Add(TableFieldSchema field)\n\nAdds the given field to the schema being built.\n\n### Add(string, TableSchema, BigQueryFieldMode, string)\n\n public void Add(string name, TableSchema nestedSchema, BigQueryFieldMode mode = BigQueryFieldMode.Nullable, string description = null)\n\nCreates a nested field with the specified schema, and adds it to the schema being built.\n\n### Add(string, BigQueryDbType, BigQueryFieldMode, string)\n\n public void Add(string name, BigQueryDbType type, BigQueryFieldMode mode = BigQueryFieldMode.Nullable, string description = null)\n\nCreates a field with the specified details, and adds it to the schema being built.\n\n### Add(string, TableSchemaBuilder, BigQueryFieldMode, string)\n\n public void Add(string name, TableSchemaBuilder nestedSchema, BigQueryFieldMode mode = BigQueryFieldMode.Nullable, string description = null)\n\nCreates a nested field with the specified schema, and adds it to the schema being built.\nThis method simply delegates to [Add(string, TableSchema, BigQueryFieldMode, string)](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2.TableSchemaBuilder#Google_Cloud_BigQuery_V2_TableSchemaBuilder_Add_System_String_Google_Apis_Bigquery_v2_Data_TableSchema_Google_Cloud_BigQuery_V2_BigQueryFieldMode_System_String_) after calling [Build()](/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2.TableSchemaBuilder#Google_Cloud_BigQuery_V2_TableSchemaBuilder_Build)\non `nestedSchema`.\n\n### Build()\n\n public TableSchema Build()\n\nConstructs a [TableSchema](https://googleapis.dev/dotnet/Google.Apis.Bigquery.v2/1.68.0.3400/api/Google.Apis.Bigquery.v2.Data.TableSchema.html) from this builder.\n\n### ModifyField(string, Action\\\u003cTableFieldSchema\\\u003e)\n\n public TableSchemaBuilder ModifyField(string fieldName, Action\u003cTableFieldSchema\u003e fieldModifier)\n\nModifies the field with `fieldName` by running the given action."]]