A hash of user-provided labels associated with
the job. You can use these to organize and group your jobs.
The labels applied to a resource must meet the following requirements:
Each resource can have multiple labels, up to a maximum of 64.
Each label must be a key-value pair.
Keys have a minimum length of 1 character and a maximum length of
63 characters, and cannot be empty. Values can be empty, and have
a maximum length of 63 characters.
Keys and values can contain only lowercase letters, numeric characters,
underscores, and dashes. All characters must use UTF-8 encoding, and
international characters are allowed.
The key portion of a label must be unique. However, you can use the
same key with multiple resources.
Keys must start with a lowercase letter or international character.
#location=
deflocation=(value)
Sets the geographic location where the job should run. Required
except for US and EU.
Parameter
value (String) — A geographic location, such as "US", "EU" or
"asia-northeast1". Required except for US and EU.
[[["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-09-09 UTC."],[],[],null,["# BigQuery API - Class Google::Cloud::Bigquery::CopyJob::Updater (v1.56.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.56.0 (latest)](/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.55.0](/ruby/docs/reference/google-cloud-bigquery/1.55.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.54.0](/ruby/docs/reference/google-cloud-bigquery/1.54.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.53.0](/ruby/docs/reference/google-cloud-bigquery/1.53.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.52.1](/ruby/docs/reference/google-cloud-bigquery/1.52.1/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.51.1](/ruby/docs/reference/google-cloud-bigquery/1.51.1/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.50.0](/ruby/docs/reference/google-cloud-bigquery/1.50.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.49.1](/ruby/docs/reference/google-cloud-bigquery/1.49.1/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.48.1](/ruby/docs/reference/google-cloud-bigquery/1.48.1/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.47.0](/ruby/docs/reference/google-cloud-bigquery/1.47.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.46.1](/ruby/docs/reference/google-cloud-bigquery/1.46.1/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.45.0](/ruby/docs/reference/google-cloud-bigquery/1.45.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.44.2](/ruby/docs/reference/google-cloud-bigquery/1.44.2/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.43.1](/ruby/docs/reference/google-cloud-bigquery/1.43.1/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.42.0](/ruby/docs/reference/google-cloud-bigquery/1.42.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.41.0](/ruby/docs/reference/google-cloud-bigquery/1.41.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.40.0](/ruby/docs/reference/google-cloud-bigquery/1.40.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.39.0](/ruby/docs/reference/google-cloud-bigquery/1.39.0/Google-Cloud-Bigquery-CopyJob-Updater)\n- [1.38.1](/ruby/docs/reference/google-cloud-bigquery/1.38.1/Google-Cloud-Bigquery-CopyJob-Updater) \nReference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::CopyJob::Updater.\n\nYielded to a block to accumulate changes for an API request. \n\nInherits\n--------\n\n- [Google::Cloud::Bigquery::CopyJob](./Google-Cloud-Bigquery-CopyJob)\n\nMethods\n-------\n\n### #cancel\n\n def cancel()\n\n### #create=\n\n def create=(new_create)\n\nSets the create disposition.\n\nThis specifies whether the job is allowed to create new tables. The\ndefault value is `needed`.\n\nThe following values are supported:\n\n- `needed` - Create the table if it does not exist.\n- `never` - The table must already exist. A 'notFound' error is raised if the table does not exist. \n**Parameter**\n\n- **new_create** (String) --- The new create disposition.\n\n### #encryption=\n\n def encryption=(val)\n\nSets the encryption configuration of the destination table. \n**Parameter**\n\n- **val** (Google::Cloud::BigQuery::EncryptionConfiguration) --- Custom encryption configuration (e.g., Cloud KMS keys).\n**Example** \n\n```ruby\nrequire \"google/cloud/bigquery\"\n\nbigquery = Google::Cloud::Bigquery.new\ndataset = bigquery.dataset \"my_dataset\"\ntable = dataset.table \"my_table\"\n\nkey_name = \"projects/a/locations/b/keyRings/c/cryptoKeys/d\"\nencrypt_config = bigquery.encryption kms_key: key_name\njob = table.copy_job \"my_dataset.new_table\" do |job|\n job.encryption = encrypt_config\nend\n```\n\n### #labels=\n\n def labels=(value)\n\nSets the labels to use for the job. \n**Parameter**\n\n- **value** (Hash) ---\n\n A hash of user-provided labels associated with\n the job. You can use these to organize and group your jobs.\n\n The labels applied to a resource must meet the following requirements:\n - Each resource can have multiple labels, up to a maximum of 64.\n - Each label must be a key-value pair.\n - Keys have a minimum length of 1 character and a maximum length of 63 characters, and cannot be empty. Values can be empty, and have a maximum length of 63 characters.\n - Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.\n - The key portion of a label must be unique. However, you can use the same key with multiple resources.\n - Keys must start with a lowercase letter or international character.\n\n### #location=\n\n def location=(value)\n\nSets the geographic location where the job should run. Required\nexcept for US and EU. \n**Parameter**\n\n- **value** (String) --- A geographic location, such as \"US\", \"EU\" or \"asia-northeast1\". Required except for US and EU.\n**Example** \n\n```ruby\nrequire \"google/cloud/bigquery\"\n\nbigquery = Google::Cloud::Bigquery.new\ndataset = bigquery.dataset \"my_dataset\"\ntable = dataset.table \"my_table\"\ndestination_table = dataset.table \"my_destination_table\"\n\ncopy_job = table.copy_job destination_table do |j|\n j.location = \"EU\"\nend\n\ncopy_job.wait_until_done!\ncopy_job.done? #=\u003e true\n```\n\n### #refresh!\n\n def refresh!()\n\n**Alias Of** : [#reload!](./Google-Cloud-Bigquery-CopyJob-Updater#Google__Cloud__Bigquery__CopyJob__Updater_reload!_instance_)\n\n### #reload!\n\n def reload!()\n\n**Aliases**\n\n- [#refresh!](./Google-Cloud-Bigquery-CopyJob-Updater#Google__Cloud__Bigquery__CopyJob__Updater_refresh!_instance_)\n\n### #rerun!\n\n def rerun!()\n\n### #wait_until_done!\n\n def wait_until_done!()\n\n### #write=\n\n def write=(new_write)\n\nSets the write disposition.\n\nThis specifies how to handle data already present in the table. The\ndefault value is `append`.\n\nThe following values are supported:\n\n- `truncate` - BigQuery overwrites the table data.\n- `append` - BigQuery appends the data to the table.\n- `empty` - An error will be returned if the table already contains data. \n**Parameter**\n\n- **new_write** (String) --- The new write disposition."]]