Sets the action that occurs if the destination table already exists. Each
action is atomic and only occurs if BigQuery is able to complete the job
successfully. Creation, truncation and append actions occur as one atomic
update upon job completion.
[[["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-04 UTC."],[],[],null,["# BigQuery Client - Class CopyJobConfiguration (1.34.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.34.0 (latest)](/php/docs/reference/cloud-bigquery/latest/CopyJobConfiguration)\n- [1.33.1](/php/docs/reference/cloud-bigquery/1.33.1/CopyJobConfiguration)\n- [1.32.0](/php/docs/reference/cloud-bigquery/1.32.0/CopyJobConfiguration)\n- [1.31.1](/php/docs/reference/cloud-bigquery/1.31.1/CopyJobConfiguration)\n- [1.30.3](/php/docs/reference/cloud-bigquery/1.30.3/CopyJobConfiguration)\n- [1.29.0](/php/docs/reference/cloud-bigquery/1.29.0/CopyJobConfiguration)\n- [1.28.3](/php/docs/reference/cloud-bigquery/1.28.3/CopyJobConfiguration)\n- [1.27.0](/php/docs/reference/cloud-bigquery/1.27.0/CopyJobConfiguration)\n- [1.26.1](/php/docs/reference/cloud-bigquery/1.26.1/CopyJobConfiguration)\n- [1.25.1](/php/docs/reference/cloud-bigquery/1.25.1/CopyJobConfiguration)\n- [1.24.2](/php/docs/reference/cloud-bigquery/1.24.2/CopyJobConfiguration)\n- [1.23.10](/php/docs/reference/cloud-bigquery/1.23.10/CopyJobConfiguration) \nReference documentation and code samples for the BigQuery Client class CopyJobConfiguration.\n\nRepresents a configuration for a copy job. For more information on the\navailable settings please see the\n[Jobs configuration API documentation](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job).\n\nExample: \n\n use Google\\Cloud\\BigQuery\\BigQueryClient;\n\n $bigQuery = new BigQueryClient();\n $sourceTable = $bigQuery-\u003edataset('my_dataset')\n -\u003etable('my_source_table');\n $destinationTable = $bigQuery-\u003edataset('my_dataset')\n -\u003etable('my_destination_table');\n\n $copyJobConfig = $sourceTable-\u003ecopy($destinationTable);\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ BigQuery\n\nMethods\n-------\n\n### __construct\n\n### createDisposition\n\nSet whether the job is allowed to create new tables. Creation, truncation\nand append actions occur as one atomic update upon job completion.\n\nExample: \n\n $copyJobConfig-\u003ecreateDisposition('CREATE_NEVER');\n\n### destinationEncryptionConfiguration\n\nSets the custom encryption configuration (e.g., Cloud KMS keys).\n\nExample: \n\n $copyJobConfig-\u003edestinationEncryptionConfiguration([\n 'kmsKeyName' =\u003e 'my_key'\n ]);\n\n### destinationTable\n\nSets the destination table.\n\nExample: \n\n $table = $bigQuery-\u003edataset('my_dataset')\n -\u003etable('my_table');\n $copyJobConfig-\u003edestinationTable($table);\n\n### sourceTable\n\nSets the source table to copy.\n\nExample: \n\n $table = $bigQuery-\u003edataset('my_dataset')\n -\u003etable('source_table');\n $copyJobConfig-\u003esourceTable($table);\n\n### writeDisposition\n\nSets the action that occurs if the destination table already exists. Each\naction is atomic and only occurs if BigQuery is able to complete the job\nsuccessfully. Creation, truncation and append actions occur as one atomic\nupdate upon job completion.\n\nExample: \n\n $copyJobConfig-\u003ewriteDisposition('WRITE_TRUNCATE');"]]